2015年6月28日星期日

SpeechEnglish_001: 2014北美演讲协会最佳励志演讲《Dream(摘录+整理)




I don't know what that dream is that you have.
我不知道你有什么样的梦想
I don't care how disappointing it might have been, as you've been working toward that dream.
我不在乎你朝着梦想前进时曾遇到什么样的困难
But that dream that your holding in your mind that it’s possible and some of you already know that it’s hard.
那个你放在心上想了又想的梦想 它是有可能达成的 虽然你可能觉得它太困难了
It's not easy. It's hard changing your life.
它并不简单 要改变你的生命很难
That in the process working on your dreams you are going to incur incur a lot of disappointment, a lot of failure, a lot of pain.
为梦想打拼的过程中 你会遇上无数的打击 无数的失败 无数的痛楚
At moments when you're going to doubt yourself and say God why why is this happening to me.
你会有质疑自己的时候 会问上苍为何这就是我的命运
I'm just trying to take care of my children, my mother. I'm not trying to steal or rob from anybody.
我不过是想照顾我的小孩父母,又不是去偷去抢
How does this have to happen to me?
为何这样的事会发生在我身上
For those of you that have experienced some hardships don't give up on your dream.
曾经遇到过难处的人 不要放弃你的梦想
The rough times are going to come, but they are not coming to stay. They have come to pass.
艰难的日子会到来,但它们终将成为过往
Greatness is not this wonderful, esoteric, illusive god-like feature that only the special among us will ever taste.
伟大的成就并非虚幻不切实际 并非像神一样只有卓越不凡的人才当得了
It’s something that truly exists in all of us.
它是真实的存在于我们每个人心中
It’s very important for you to believe that you are the one.
重要的是你必须相信,你做得到
Most people they raise a family, they earn a living and then they die.
大部分的人成家立业,日复一日然后老死
They stop growing, they stop working on themselves, they stop stretching, and they stop pushing themselves.
他们停止成长,停止锻炼自己,停止试图超越自己
Then a lot of people like to complain but they don't want to do anything about their situation.
然后还有人很爱抱怨却不敢尝试改变现况
And most people don't work on their dreams, why?
多数人都不想为自己的梦想努力,为什么?
One is because of fear, the fear of failure. What if things aren't worked out?
原因之一就是害怕失败, “万一事情不如预期怎么办?”
And the fear of success, what if they do and I can't handle it.
再来就是害怕成功, “万一成功后我没能力掌控怎么办?” 
These are not risk-takers.
他们完全不想承担风险
You spend so much time with other people, you spend so much time trying to get people to like you.
你花了大量的时间与他人交际,想让别人喜欢你
You know other people more than you know yourself.
你了解他人超过了解自我
You studied them you know about them, you want to hang out like them, you want to be just like them.
你观察他们,知道他们一切事情,想跟他们混在一起,变得跟他们一样
And you know what you’ve invested so much time on them, you don't know who you are.
然而你知道吗?你花了那么多时间在他们身上,最终却失去自我
I challenge you to spend time by yourself.
我要你学会与自己坦诚相处
It’s necessary, that you get the losers out of your life, if you want to live your dream.
如果你想达成梦想,就必需将你内心的莽蛇去除
But people who are running towards their dreams life has a special kind of meaning.
朝自己梦想前进的人,生命会有截然不同的特殊意义
When you become the right person, what you do is start separating yourself from other people.
当你找到了自我,慢慢的你会与他人有所不同
You begin to have a sudden uniqueness.
开始拥有自己的特点
As long as you follow on other people,  as long as your being a copycat you will never ever be the best copycat in the world.
但若你只懂跟他人脚步以及模仿他人 你永远无法变成最强的模仿者
But you will be the best you could be.
但你可以成为最优秀的自己
I challenge you to define your value.
我要你找到自己的价值
That  everybody won't see it,  that everybody won't join you, that everybody won't have the vision.
其他人看不见,无法参与,也不会为你拓展视野
It is necessary to know that.
这是你要了解的
That you are an uncommon breed.
你是独一无二的
It is necessary that you align yourself with people and attract people into your business, who are hungry.
我要你结交志同道合的人
People that are unstoppable and unreasonable, people who are refusing to live life just as it is and who want more.
渴望成功的人 努力不懈的人 那些想要重新打造生命的人
The people that are living their dreams, are fighting winners to attach themselves to.
那些正在实现梦想的人, 是为胜利而战的斗士
The people that are living their dreams, are the people that know if it's gonna happen it's up to them.
那些正在实现梦想的人,知道梦想能否实现完全取决于自己的奋斗。
If you want to be more successful.
如果你想要更有成就
If you want to have and do stuff you’ve never done before, I'm asking you to invest in you.
如果你想要做些从未做过的事 那你就必须投资自己
To invest in you!
一定要投资自己
Someone's opinion of you, does not have to become your reality.
不要让他人的成见称为自己现实的一部分
That you don't have to go through life being a victim.
不要抱着受难者的心态度过一生
And even though  you face disappointments, you have to know within yourself, that I can do this, even if no one else sees it for me, I must see it for myself.
就算你遇上了气馁的事,也要知道 你做得到,就算别人不相信,你也要有自信
This is what I believe and I am willing  to die for it.Period.
这是我所相信的,至死不渝
No matter how bad it is or how bad it gets, I'm going to make it.
不论情况多糟,未来有多险恶 我都办得到
I want to represent an idea.  I want to represent possibilities.
我想要代表一个信念,代表很多的可能性
Some of you right now, you want to go to the next level.
你们有些人可能在想要更上一层
I want a council,  you want to be an Engineer, I want to be a Doctor.
想要有自己的协会,想当工程师或医师
Listen to me. You can't get to that  level. You can't get to that  level economically where you want to be,  until you start investing in your mind.
相信我你到不了的 你到不了你想到的层次,除非你开始培育自己的心力
You're not reading books. I'm challenging you all to go to conference.
你根本连读书的习惯都没有 我要你去听听演说
I dare you to invest time. I dare you to be alone.
懂得花时间 与自己相处
I dare you to spend an hour to get to know yourself.
花个一小时试图了解自己
When you become who you are, when you become the person you are created to be, designed to be who you were designed to be.
直到你找到了自我 当你活出了自我,活出了属于自己该有的命运
When you become an individual. What you do is take yourself and start separating yourself from other people.
当你是一个独特的个体 你就会与周遭的人有所不同
I'm challenging you to get to a place where people do not like you or do not even bother you anymore.
我要你做别人不要你做的事 达到别人不想理会你的领域
Why? Because you are not concerned about trying to make them happy.
因为这样你就不会整天想着该如何取悦他们
Because your trying to blow it, you're trying to get to the next level.
因为你想要与众不同,你想要更上一层
I need you to invest in your mind.
我要你培育你自己的心力
If you're still talking about your dreams.
如果你还在谈说你的梦想
If you're still talking about your goals.
还在谈说你的目标
But you have not done anything yet, just take the first step.
但却什么都没做 那就先踏出第一步
You can make your parents proud.
你可以让你的父母骄傲
You can make your school proud.
让你的学校骄傲
You can touch millions of lives and the world will never be the same again because you came this way.
你可以感动千百万人的生命,世界会因为有你而不同
Don't let anybody steal your dream.
别让其他人毁了你的梦想
After we face rejection and a “NO”, we have a meeting and no one shows up, or somebody said you can count on me, and they don't come through.
在别人拒绝了或说不时,或在某个会面你被放鸽子 又或者有人取得了你的信任却无法兑现承诺
What if we had that type of attitude  that cause repossess, nobody believes in you, you've lost again and again and again.
即使自己的心态使你停下脚步,一次又一次的迷失 
The lights are cut off, but you still are looking at your dream, reviewing it everyday and saying to yourself, IT'S NOT OVER UNTIL I WIN!
没了动力 还是要每天反复的想着自己的梦想 然后对着自己说一切还没结束,直到我胜利
You can live your dream!!!
你可以实现你的梦想!

视频地址:https://www.youtube.com/watch?v=N5NF01Rpepo

1. 单词
(1)disappointment
英[ˌdɪsəˈpɔɪntmənt] 美[ˌdɪsəˈpɔɪntmənt]
n.  失望,扫兴; 令人失望的行为(人);
(2)esoteric
英[ˌesəˈterɪk] 美[ˌɛsəˈtɛrɪk]
adj.  秘传的; 机密的; 难解的,深奥的; 限于少数人的;
(3)illusive
英[ɪ'lu:sɪv] 美[ɪˈlusɪv]
adj.    虚假的; 幻影的; 迷惑人的; 错觉的;
(4)uniqueness
英[jʊ'ni:knəs] 美[jʊ'ni:knəs]
n.    唯一性,单值性,独特性;
(5)copycat
英[ˈkɒpikæt] 美[ˈkɑ:pikæt]
n.    盲目模仿者;
(6)uncommon
英[ʌnˈkɒmən] 美[ʌnˈkɑ:mən]
adj.  罕见的; 不寻常的; 非凡的,杰出的; 非常接近的;
(7)breed
英[bri:d] 美[brid]
vt.    产(后代),生; 产生,导致; 优生交配; 养育,训练;
vi.    产仔; 繁殖,旺盛生长;
n.    属; 种类; 类型; 血统;
(8)unstoppable
英[ʌnˈstɒpəbl] 美[ʌnˈstɑ:pəbl]
adj.  无法停止的,不可阻碍的;
(9)unreasonable
英[ʌnˈri:znəbl] 美[ʌnˈrizənəbəl]
adj.  不合理的,荒唐的; 非理智的,不讲理的; 不当的(收费等); 过度的;
(9)council
英[ˈkaʊnsl] 美[ˈkaʊnsəl]
n.    委员会; 政务会(郡、镇等); 协商会议(尤指旧时讨论特定步骤的); 市政(或地方管理)服务机构;
(10)conference
英[ˈkɒnfərəns] 美[ˈkɑ:nfərəns]
n.  会议; 讨论; 讨论会(正式); [工会、工党用语] 大会(每年的);
vi. 举行或参加(系列)会议;
(11)blow
英[bləʊ] 美[bloʊ]
n.   殴打,打击; 吹风,一阵风; 意外的灾害; 吹奏(声);
vt.& vi.  吹(风); 爆炸(轮胎等);
vt.  吹,吹气; 使爆炸; 奏出,演奏; 使气喘;
(12)economically
英[ˌi:kəˈnɒmɪkli] 美[ˌi:kəˈnɑ:mɪkli]
adv.  在经济上; 经济地; 节约地; 节省地;
(13)repossess
英[ˌri:pəˈzes] 美[ˌripəˈzɛs]
vt.    取回,收回,重新获得; 把占有权还给…。;

2. 短语
 (1)align with  
英[əˈlaɪn wið] 美[əˈlaɪn wɪð]
v.    与...结盟;
 (2)hang out
英[hæŋ aut] 美[hæŋ aʊt]
[释义]  伸出; 居住; 晾晒; (呆在某处,或与某人呆在一起)闲逛(infml);
(3)invest in
英[inˈvest in] 美[ɪnˈvɛst ɪn]
[释义]    在…上投资,在…投入(时间、精力等);
(4)count on
英[kaunt ɔn] 美[kaʊnt ɑn]
[释义]  指望; 依靠; 依赖; 期望;
(5)come through
英[kʌm θru:] 美[kʌm θru]
[释义]  穿过; 到达; 传来; 恢复(健康);

2015年6月18日星期四

MusicEnglish_001:Light a fire

Light a fire 点燃一团火


演唱者:Rachel Taylor
专辑:《Come Alive》

You may say you are walking 你也许会说每迈一步
All by your self 全要凭靠自己
Have no one else 没有别人帮助
Your life is deadly like a loaded gun 你的生活像极了一把上了膛的枪
and your shaking love 还有你那摇摇欲坠的爱情
Don't shiver,don't give up,don't quiver 不要发怵,不要放弃,不要颤栗
You are enough, you will be just fine 你是如此完美,你会好起来的
Tonight 就在今夜
Baby when it's cold outside 宝贝,外面正冷
I will keep you warm, save you from the storm 我会把温暖给你,拯救你于风暴中
I will light a fire and embers bright 我将化作一团火,直到余烬的光明
will guide you through the night 指引你穿过暗夜
when it's cold outside 外面正冷
I will light a fire,I will light a fire 我会化作一团火,我会化作一团火
I will light a fire 我会化作一团火
when it's cold out side,I will light a fire 外面正冷,我会化作一团火
Keep your bright eyes looking up to the sky now 睁开你明澈的眼睛,遥望天空
Chin up be proud walk strong like a soldier 昂起头,阔步前行,就像一个士兵
onto the battlegroung 踏上征程
breath in breath out 呼吸之间
don't shiver,don't give up, don't quiver 不要发怵,不要放弃,不要颤栗
You are enough,you will be just fine 你是如此完美,你会好起来的
Tonight 就在今夜
Baby when it's cold outside 宝贝,外面正冷
I will keep you warm, save you from the storm 我会把温暖给你,拯救你于风暴中
I will light a fire and the embers bright 我将化作一团火,直到余烬的光明
will guide you through the night 指引你穿过暗夜
when it's cold outside 外面正冷
I will light a fire,I will light a fire 我会化作一团火,我会化作一团火
I will light a fire 我会化作一团火
You've been at the bottom, only surviving 你身在地狱,只求多福
you decide who you are now 你想自己怎样,此刻就决定
I'm with you through everything 我和你一起应对千难万险
Baby when it's cold out side 宝贝,外面正冷
I will keep you warm, save you from the storm 我会把温暖给你,拯救你于风暴中
I will light a fire and the embers bright 我将化作一团火,直到余烬的光明
will guide you through the night 指引你穿过暗夜
when it's cold outside 外面正冷

 1. 单词
(1)quiver
英[ˈkwɪvə(r)] 美[ˈkwɪvɚ]
vt.& vi. 微颤,抖动;
vt. 使震动;
n.  抖动; 箭筒; 箭筒; 颤音;
(2)ember
英[ˈembə(r)] 美[ˈɛmbɚ]
n.    余烬,余火;
(3)chin
英[tʃɪn] 美[tʃɪn]
n.    颏,下巴(尤指人的); 聊天; 引体向上动作;
v.    用下巴夹住; 聊天; 作引体向上动作;
(3)battleground
英['bætlɡraʊnd] 美[ˈbætlˌɡraʊnd]
n.    战场; 论争的主题;

2. 短语
(1)chin up 昂起头

2015年6月10日星期三

Java_023:JDK 自带小工具介绍之六:jmap

环境:MAC OS X 10.10.3 + Oracle JDK 1.7.0_80

jmap 显示运行中JVM内存的使用情况。

1. 用法
(1)jmap [option] PID
(2)jmap [option] executable core  
(3)jmap [option] [server_id@] remote server IP or hostname

option 参数可以有如下值:
(1)-heap:打印heap的情况。
(2)-histo:打印heap的直方图。其输出信息包括类名,对象数量,对象占用大小。
(3)--histo:live :同上,但是只打印存活对象的情况。
(4)-permstat:打印permanent generation heap情况。

2. 使用例子
(1)jmap -heap 28218
Attaching to process ID 28218, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.80-b11

using thread-local object allocation.
Parallel GC with 8 thread(s)

Heap Configuration:
   MinHeapFreeRatio = 0
   MaxHeapFreeRatio = 100
   MaxHeapSize      = 1367343104 (1304.0MB)
   NewSize          = 1310720 (1.25MB)
   MaxNewSize       = 17592186044415 MB
   OldSize          = 5439488 (5.1875MB)
   NewRatio         = 2
   SurvivorRatio    = 8
   PermSize         = 21757952 (20.75MB)
   MaxPermSize      = 268435456 (256.0MB)
   G1HeapRegionSize = 0 (0.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 370147328 (353.0MB)
   used     = 51031488 (48.66741943359375MB)
   free     = 319115840 (304.33258056640625MB)
   13.786804372122875% used
From Space:
   capacity = 42991616 (41.0MB)
   used     = 1212416 (1.15625MB)
   free     = 41779200 (39.84375MB)
   2.8201219512195124% used
To Space:
   capacity = 42467328 (40.5MB)
   used     = 0 (0.0MB)
   free     = 42467328 (40.5MB)
   0.0% used
PS Old Generation
   capacity = 911212544 (869.0MB)
   used     = 25955856 (24.753433227539062MB)
   free     = 885256688 (844.2465667724609MB)
   2.848496343790456% used
PS Perm Generation
   capacity = 58720256 (56.0MB)
   used     = 58384392 (55.67969512939453MB)
   free     = 335864 (0.32030487060546875MB)
   99.42802701677594% used

25588 interned Strings occupying 2864016 bytes.

(2)jmap -histo 28218
可以查看java进程中的所有实例、实例的个数,可用于查询单例对象是否真的只生成了一个实例。
num     #instances         #bytes  class name
----------------------------------------------
   1:         81575       11722720 
   2:         81575       10452416 
   3:          8570       10051584 
   4:          8567        6175536 
   5:          7317        5623328 
   6:         56838        5150184  [C
   7:         24518        3694920  [B
   8:         60535        1937120  java.util.HashMap$Entry
   9:         46036        1848096  [Ljava.lang.Object;
  10:         56582        1357968  java.lang.String
  11:         42072        1009728  java.util.ArrayList
  12:          2137         996464 
  13:          9142         899600  java.lang.Class
  14:          6017         848736  [Ljava.util.HashMap$Entry;
  15:         13074         776880  [S
  16:         13477         630936  [[I
  17:           576         581624  [I
  18:             3         393264  [Ljava.net.Socket;
  19:           558         303552 
  20:          7287         291480  java.util.LinkedHashMap$Entry
  21:            35         265616  [J
  22:          4776         229248  java.util.HashMap


(3)jmap -histo:live 28218

(4)jmap  -dump:format=b,file=/path/heap.bin PID
该命令通常用来分析内存泄漏Out of Memory。
首先配置JVM启动参数,让JVM在遇到OutOfMemoryError时自动生成Dump文件: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path 
然后使用上述命令进行分析。

(5)jmap  -dump:live,format=b,file=/path/heap.bin PID 
如果只dump heap中的存活对象,则加上选项-live。

使用(4)或(5)dump heap中的对象到文件后,可以使用MAT(Memory Analyzer Tool)进行离线分析。
MAT 是Eclipse上的一个插件。

参考文献:
1. http://zheng12tian.iteye.com/blog/1420508
2. http://blog.csdn.net/fenglibing/article/details/6298326

2015年6月9日星期二

Java_022:JDK 自带小工具介绍之五:jstat

环境:MAC OS X 10.10.3 + Oracle JDK 1.7.0_80

jstat 可以观察到 classloader,compiler,gc相关信息。

1. 命令语法

jstat -<option> [-t] [-h<lines>] <vmid> [<interval> [<count>]]

参数解释:
(1)options:选项,比如 -gcutil
(2)vmid:当前运行的java进程号 
(3)interval:间隔时间,单位为秒或者毫秒 
(4)count:打印次数,如果缺省则打印无数次

2. options 参数说明
(1)-class:统计class loader行为信息
(2)-compile:统计编译行为信息
(3)-gc:统计jdk gc时heap信息
(4)-gccapacity:统计不同的代相应的heap容量情况
(5)-gccause:统计gc的情况,(同-gcutil)和引起gc的事件
(6)-gcnew:统计gc时,新生代的情况
(7)-gcnewcapacity:统计gc时,新生代heap容量
(8)-gcold:统计gc时,老年区的情况
(9)-gcoldcapacity:统计gc时,老年区heap容量
(10)-gcpermcapacity:统计gc时,permanent区heap容量
(11)-gcutil:统计gc时,heap情况
(12)-printcompilation:

3. 使用例子
(1)jstat -class 28218 3000 10
查看进程 28218 classloader 的情况,每 3 秒输出一次,输出 10 次。
Loaded  Bytes  Unloaded  Bytes     Time  
  8664 17500.9        0     0.0       7.35
  8664 17500.9        0     0.0       7.35

(2)jstat -gc 28218 3000 10
查看进程 28218 gc 的情况,每 3 秒输出一次,输出 10 次。
 S0C    S1C    S0U    S1U      EC       EU        OC         OU       PC     PU    YGC     YGCT    FGC    FGCT     GCT  
41472.0 1536.0  0.0   1472.0 367104.0 273200.3  889856.0   17311.6   48640.0 48299.9      7    0.280   0      0.000    0.280

输出参数说明:
  • S0C:Heap上的 Survivor space 0 区空间大小(KB) 
  • S1C:Heap上的 Survivor space 1 区空间大小(KB) 
  • S0U:Heap上的 Survivor space 0 区已使用空间大小(KB) 
  • S1U:Heap上的 Survivor space 1 区已使用空间大小(KB) 
  • EC:Heap上的 Eden space 区空间大小(KB)
  • EU:Heap上的 Eden space 区已使用空间大小(KB) 
  • OC:Heap上的 Old space 区空间大小(KB)
  • OU:Heap上的 Old space 区已使用空间大小(KB) 
  • PC:Perm space 区空间大小(KB)
  • PU:Perm space 区已使用空间大小(KB)
  • YGC:从应用程序启动到采样时发生 Young GC 的次数 
  • YGCT:从应用程序启动到采样时 Young GC 所用的时间(单位秒)
  • FGC:从应用程序启动到采样时发生 Full GC 的次数 
  • FGCT:从应用程序启动到采样时 Full GC 所用的时间(单位秒)
  • GCT:从应用程序启动到采样时用于垃圾回收的总时间(单位秒)
 (3)jstat -gcutil -h 10  6050 1000
查看进程 6050 gc 和 heap 的情况,每 1 秒输出一次,输出无数次。

参考文献:
1. http://www.cnblogs.com/alipayhutu/archive/2012/08/20/2647353.html 
2. https://dzone.com/articles/how-monitor-java-garbage

Java_021:JDK 自带小工具介绍之四:jstack

环境:MAC OS X 10.10.3 + Oracle JDK 1.7.0_80

jstack 显示指定的 java 进程的 thread dump,或者显示一个已经生成的 core 文件内容,或者连接远程机器的服务的 java 堆栈信息。

1. 用法
(1)连接到运行的 java 进程:jstack [-l] <pid>
(2)连接到挂起的 java 进程:jstack -F [-m] [-l] <pid>
(3)连接到一个 core 文件:jstack [-m] [-l] <executable> <core>
其中 executable 是产生 core 文件的 java 命令。
(4)连接到远程机器的一个 Debug Server :jstack [-m] [-l] [server_id@]<remote server IP or hostname>
其中 server_id 是远程机器上的一个 Debug Server ID。

2. 参数说明
(1)-F  强制产生一个 thread dump。
(2)-m 输出 java 和 native 线程堆栈。
(3) -l  长格式输出,增加额外的锁信息。
(4) -h 帮助

3. 例子
(1)jstack –l 23561
(2)jstack $JAVA_HOME/bin/java core
(3)jstack -m 21177

参考文献:
1. http://blog.csdn.net/zhaozheng7758/article/details/8623535/
2. https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr016.html
3. https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jstack.html

Java_020:JDK 自带小工具介绍之三:jinfo

环境:MAC OS X 10.10.3 + Oracle JDK 1.7.0_80

jinfo 显示运行中的java进程的运行环境参数:参数包括Java System属性和JVM命令行参数。
另外,系统崩溃时,jinfo可以从core文件里面知道崩溃的Java应用程序的配置信息。

$jinfo 28218

Attaching to process ID 28218, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.80-b11
Java System Properties:

jboss.modules.system.pkgs = org.jboss.byteman
logging.configuration = file:/Users/maping/Redhat/eap/demo/myeap/configuration/logging.properties
java.vendor = Oracle Corporation
jboss.qualified.host.name = mapingdemacbook-pro.local
sun.java.launcher = SUN_STANDARD
jboss.modules.policy-permissions = true
org.apache.xml.security.ignoreLineBreaks = true
javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.nio.ch.bugLevel =
os.name = Mac OS X
sun.boot.class.path = /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/classes
jboss.server.persist.config = true
java.vm.specification.vendor = Oracle Corporation
java.runtime.version = 1.7.0_80-b15
javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory
user.name = maping
javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory
jboss.node.name = mapingdemacbook-pro
[Standalone] =
javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory
jboss.home.dir = /Users/maping/Redhat/eap/demo/jboss-eap-6.4
user.language = zh
sun.boot.library.path = /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib
java.version = 1.7.0_80
java.util.logging.manager = org.jboss.logmanager.LogManager
java.net.preferIPv4Stack = true
user.timezone = Asia/Chongqing
jboss.socket.binding.port-offset = 10000
sun.arch.data.model = 64
http.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
java.endorsed.dirs = /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/endorsed
java.rmi.server.randomIDs = true
sun.cpu.isalist =
sun.jnu.encoding = UTF-8
jboss.server.config.dir = /Users/maping/Redhat/eap/demo/myeap/configuration
file.encoding.pkg = sun.io
file.separator = /
java.specification.name = Java Platform API Specification
java.class.version = 51.0
user.country = CN
javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom = __redirected.__XPathFactory
java.home = /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre
javax.xml.parsers.DocumentBuilderFactory = __redirected.__DocumentBuilderFactory
java.vm.info = mixed mode
os.version = 10.10.3
org.jboss.boot.log.file = /Users/maping/Redhat/eap/demo/myeap/log/server.log
path.separator = :
java.vm.version = 24.80-b11
java.protocol.handler.pkgs = org.jboss.net.protocol|org.jboss.vfs.protocol
java.awt.printerjob = sun.lwawt.macosx.CPrinterJob
jboss.modules.dir = /Users/maping/Redhat/eap/demo/jboss-eap-6.4/modules
sun.io.unicode.encoding = UnicodeBig
jboss.server.deploy.dir = /Users/maping/Redhat/eap/demo/myeap/data/content
awt.toolkit = sun.lwawt.macosx.LWCToolkit
module.path = /Users/maping/Redhat/eap/demo/jboss-eap-6.4/modules
socksNonProxyHosts = local|*.local|169.254/16|*.169.254/16
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
jboss.server.temp.dir = /Users/maping/Redhat/eap/demo/myeap/tmp
java.naming.factory.url.pkgs = org.jboss.as.naming.interfaces:org.jboss.ejb.client.naming
user.home = /Users/maping
java.specification.vendor = Oracle Corporation
org.xml.sax.driver = __redirected.__XMLReaderFactory
java.library.path = /Users/maping/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
org.jboss.resolver.warning = true
java.vendor.url = http://java.oracle.com/
java.vm.vendor = Oracle Corporation
gopherProxySet = false
java.runtime.name = Java(TM) SE Runtime Environment
sun.java.command = /Users/maping/Redhat/eap/demo/jboss-eap-6.4/jboss-modules.jar -mp /Users/maping/Redhat/eap/demo/jboss-eap-6.4/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/Users/maping/Redhat/eap/demo/jboss-eap-6.4 -Djboss.server.base.dir=/Users/maping/Redhat/eap/demo/myeap -Djboss.server.base.dir=/Users/maping/Redhat/eap/demo/myeap -c standalone-logtest.xml -bmanagement 192.168.0.105 -Djboss.socket.binding.port-offset=10000
java.class.path = /Users/maping/Redhat/eap/demo/jboss-eap-6.4/jboss-modules.jar
org.jboss.security.context.ThreadLocal = true
jboss.bind.address.management = 192.168.0.105
jboss.server.log.dir = /Users/maping/Redhat/eap/demo/myeap/log
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.version = 1.7
catalina.home = /Users/maping/Redhat/eap/demo/myeap/tmp
sun.cpu.endian = little
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema = __redirected.__SchemaFactory
sun.os.patch.level = unknown
java.awt.headless = true
java.io.tmpdir = /var/folders/3w/hlhsjmns5m9g6xv6xqk2864h0000gn/T/
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
jboss.server.data.dir = /Users/maping/Redhat/eap/demo/myeap/data
os.arch = x86_64
java.awt.graphicsenv = sun.awt.CGraphicsEnvironment
java.ext.dirs = /Users/maping/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
user.dir = /Users/maping/Redhat/eap/demo/jboss-eap-6.4/bin
line.separator =

java.vm.name = Java HotSpot(TM) 64-Bit Server VM
jboss.server.base.dir = /Users/maping/Redhat/eap/demo/myeap
javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder
javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory
file.encoding = UTF-8
java.specification.version = 1.7
jboss.host.name = mapingdemacbook-pro
javax.xml.transform.TransformerFactory = __redirected.__TransformerFactory
jboss.server.name = mapingdemacbook-pro

VM Flags:

-D[Standalone] -XX:+UseCompressedOops -verbose:gc -Xloggc:/Users/maping/Redhat/eap/demo/myeap/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true -Dorg.jboss.boot.log.file=/Users/maping/Redhat/eap/demo/myeap/log/server.log -Dlogging.configuration=file:/Users/maping/Redhat/eap/demo/myeap/configuration/logging.properties

Java_019:JDK 自带小工具介绍之二:jconsole

环境:MAC OS X 10.10.3 + Oracle JDK 1.7.0_80


jconsole 是一个基于GUI的JVM监控工具,可以监控内存、线程、jvm堆栈、执行GC等,不仅可以对本机JVM进行监控,也可用于远程主机的JVM。

用法:jconsole [ -interval=n ] [ -notile ] [ -pluginpath  ] [ -version ] [ connection ...]
(1)-interval   将更新间隔时间设置为 n 秒(默认值为 4 秒)
(2)-notile     最初不平铺显示窗口(对于两个或更多连接)
(3)-pluginpath 指定 jconsole 用于查找插件的路径
(4)-version    输出程序版本
(5)connection = pid || host:port || JMX URL (service:jmx:://...)
  pid 目标进程的进程 ID
  host 远程主机名或 IP 地址
  port  用于远程连接的端口号
(6)-J 对正在运行 jconsole 的 Java 虚拟机指定输入参数

参考文献:
1. http://blog.csdn.net/fenglibing/article/details/6411965
2. http://zheng12tian.iteye.com/blog/1420508
3. http://blog.csdn.net/cyq1984/article/details/5766776
4. http://blog.chinaunix.net/uid-21340438-id-3854472.html

Java_018:JDK 自带小工具介绍之一:jps

环境:MAC OS X 10.10.3 + Oracle JDK 1.7.0_80

jps 显示机器当前所有java进程。

1. jps
$ jps
27947 Jps
27718 jboss-modules.jar

2. jps -q 只显示pid
$ jps -q
27946
27718

3. jps -m 输出传递给main 方法的参数
$ jps -m
27945 Jps -m
27718 jboss-modules.jar -mp /Users/maping/Redhat/eap/demo/jboss-eap-6.4/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/Users/maping/Redhat/eap/demo/jboss-eap-6.4 -Djboss.server.base.dir=/Users/maping/Redhat/eap/demo/myeap -Djboss.server.base.dir=/Users/maping/Redhat/eap/demo/myeap -c standalone-logtest.xml -Djboss.socket.binding.port-offset=10000

3. jps -l 输出应用程序main class的完整package名 或者 应用程序的jar文件完整路径名
$ jps -l
27948 sun.tools.jps.Jps
27718 /Users/maping/Redhat/eap/demo/jboss-eap-6.4/jboss-modules.jar

4. jps -v 输出传递给JVM的参数
$ jps -v
27718 jboss-modules.jar -D[Standalone] -XX:+UseCompressedOops -verbose:gc -Xloggc:/Users/maping/Redhat/eap/demo/myeap/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true -Dorg.jboss.boot.log.file=/Users/maping/Redhat/eap/demo/myeap/log/server.log -Dlogging.configuration=file:/Users/maping/Redhat/eap/demo/myeap/configuration/logging.properties
27953 Jps -Denv.class.path=.:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/tools.jar -Dapplication.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home -Xms8m

5. jps IP_ADDRESS 显示远程机器的所有java进程
前提是远程机器提供jstatd服务,该服务采用rmi协议,默认连接端口为1099。

参考文献:
1. http://www.blogjava.net/aoxj/archive/2007/12/29/171447.html