Top
Execute the top command to view the system performance of the whole machine, which is mainly the execution of cpu and memory.
Load average in the upper right corner (system load balancing) If the addition of the three values divided by 100 is greater than 60%, it means that the system is under high pressure.
uptime
vmstat -n 2 3
View the execution status of the cup View a sample every two seconds View
all cpu core information: mpstart -P ALL 2 (sample every two s)
View the usage breakdown information of a single process using the cup: pidstat -u 1 -p 5101
free -m (check the system's memory in megabytes)
View the memory usage of a given process: pidstat -p process number -r sampling interval in seconds
Check the hard disk df -h -> (disk free h-> humans can understand)
View disk IO: iostat -xdk 2 3
Disk IO of a single process
Analyze the problem of excessive CUP occupation
- First use the top command to find out which cup takes the highest. Found that it is our java program
- ps -ef or jps -l to further locate our pid
- Locate the specific thread or code ps -mp process number -o THREAD, tid, time.
Find the specific corresponding thread
4.jstack process ID | grep thread id (hexadecimal lowercase)-A60