(三)jinfo:java配置信息工具,显示jvm参数,类似于jps -v
hadoop@gdc-dn06-formal:~$ jinfo -flags 48150
Attaching to process ID 48150, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.65-b04
(四)jmap:java内存映像工具
$ jmap -dump:file=1.txt 48150
Dumping heap to /home/hadoop/1.txt ...
Heap dump file created
$ more 1.txt
JAVA PROFILE 1.0.2xitValueLjava/util/Set<TE;>;Ljava/lang/Object;)Val/util/MessageFormatterential;kMethod che/commons/collections/collection/AbstractCollectionDecoratorksum typeOption;)VtableChannel;J)Vava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava/lang/Process;CT_SIGNING_CAment/ThreadMXBean;>;
/DataTransferProtos$BaseHeaderProto;)Lorg/apache/hadoop/hdfs/protocol/proto/DataTransferProtos$ClientOperationHeaderProto$Builder;qDeleaming/Name;[Ljavax/naming/directory/ModificationItem;)VnputStream;Ljava/nio/charset/CharsetDecoder;)VkConstructionStagegoogle/protobuf/meGetterdeProtocolProtos$DatanodeRegistrationProto;ax/management/NotificationBroadcasterSupport$ListenerInfo;>;hdfs/protocol/proto/Datalockmanagement/DatanodeDescriptor$BlockTargetPair;>;)V.Remotea/lang/Object;V:Ljava/lang/Object;>()Ljava/util/HashMap<TK;TV;>;9.(I)Lorg/tucky/Louisvillemt
mt_MT nl no pl pt pt_BR pt_PT ro ru sk sl sq sr sr_Latn_BA sr_Latn_ME sr_Latn_RS sv tr uk | ar hi iw ja ko th vi zh Sortbase/Predicate<-TT;>;)Lcom/google/common/base/Optional<TT;>;bstractMapEntryDecorator;kPoolSliceScanner$LogEntry;S1饀serid_oidReplacementServerConstants$1yzert}+)))[pP]([-+])?(\p{Digit}+)[fFdD]?cConstraintsp<TK;TV;>;)Ljava/util/Map<TK;TV;>;doop/fs/CacheFlagt<+TE;>;)Vflect/WeakCache$Value<TV;>;BERcheckAcceptCredPermissionDeltahmRequestProtoOrBuilderm/sun/jmx/mbeanserver/MBeanAnalyzer$1nodeStorageProto$StorageState;)Lorg/apache/hadoop/hdfs/server/protocol/DatanodeStorage$State;Manager$1;ovider
selectionLjava/lang/String;Ljavax/management/ObjectName$Property;>;II)VBuilder;
(六)jstack:java堆栈跟踪工具
查看各个线程信息
$ jstack -l 48150 >> 2.txt
hadoop@gdc-dn06-formal:~$ more 2.txt
2015-05-24 11:16:27
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode):
"DataXceiver for client DFSClient_NONMAPREDUCE_1067049541_1 at /10.160.254.91:59578 [Sending block BP-1320426528-10.120.75.79-136177508
6190:blk_1545471492_1100790319712]" daemon prio=10 tid=0x00007ff12cc5b000 nid=0xa424 runnable [0x00007ff135594000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
- locked <0x00000003017d1f88> (a sun.nio.ch.Util$2)
- locked <0x00000003017d1f78> (a java.util.Collections$UnmodifiableSet)