There are a lot of commands for Linux system. Today, we mainly introduce Linux system monitoring commands. If you are interested in monitoring commands or are learning related knowledge, you may wish to understand.
Find the most CPU-intensive java thread
ps command
Command: ps -mp pid -o THREAD,tid,time or ps -Lfp pid
the results show:
this command behaves, mainly can get some information corresponding thread in a process. For example, if you want to analyze some of the running bottlenecks of a Java process, you can use this command to find the CPU usage time of all current Threads, which is the last column here.
For example, here found a TID: 30834, which takes up the highest TIME time.
By printf “%x\ ” 30834 First converted to hexadecimal, continue to dump the current jvm process stack information through the jstack command. With the Grep command, you can find the hexadecimal thread id information, and you can quickly find out where the most CPU-intensive code is.
simple explanation, the string of the thread jstack content:
Java codes
& ldquo; DboServiceProcessor-4-thread-295 & rdquo; daemon prio = 10 tid=0x00002aab047a9800 nid=0x7d9b waiting on condition [0x0000000046f66000]
nid : The corresponding linux operating system tid is the hexadecimal number converted in the front
tid: This should be jvm The unique address location in the jmm memory specification, if you use some of the memory data of jvm in detail, I have not yet reached that level, so first put down
top command
command: top -Hp pid
the results show:
and in front of the effect look, you can get real-time tracking and thread the specified process consuming the most cpu's. Then use the previous method to extract the corresponding thread stack information.
Analyzing I /O bottlenecks
mpstat command
command: mpstat -P ALL 1 1000
The results show:
Note the %iowait column inside, the time it takes for the CPU to wait for an I/O operation. This value continues to be high and is usually caused by an I/O bottleneck.
This parameter can be used to see if there is a bottleneck in the current I/O operation.
Previous12Next page Total 2 pages
Gentoo is a Linux-based operating system with near-infinite adaptability. Many frie
When you want to use the Ubuntu system, you dont have to reinstall the Ubuntu syste
The dd command is very useful on Linux systems, Linux commands that can copy files.
Because the Ubuntu desktop version is different from the Windows system, many users
Linux version of the command to install BleachBit Daquan
Steps to install StarDict software on Linux
Linux changes the way Docker runs the root directory
Linux installation using eCryptFS to encrypt files
How to transform gedit into TextMate in Linux system
Ubuntu implementation of sudo command slow solution
Linux installation VMware Tools virtual machine graphic tutorial
Solution for NFS version incompatibility in CentOS/Debian system
Linux system how to switch the foreground process and background process
What should I do if there is garbled code on the Firefox browser page under Linux?
Win7 IE browser favorites can not be used
The most obvious change in Win10 latest version 10036 Transparent start menu
Blocking five network functions Let XP system speed and arrogance
Win8 Tip: Pin the website and app to the start screen
How to set up workgroup shared file
Win10 Tip: Let the computer accurately display the iPhone7 to take photos
Help with a computer that plays LOL.CF. Watch the pioneers are smooth.
Win10 can't open the positioning function how to do