Summary of essential linux commands for fire fighting (I) ------ some commands are essential when you check online problems. It is necessary to summarize some common commands (such commands and related parameters are quite a lot, you can only summarize the commonly used ones). Generally, you can find problems in the following categories: system parameters, performance parameters, processes, memory, network, storage, memory, and jvm: system Parameters cat/proc/cpuinfo cpu-related parameters cat/proc/meminfo memory-related parameters cat/proc/loadavg performance parameters 1) top M: sort by memory usage P: sort by CPU usage 1: display the usage of each CPU k: kill process o: More sorting rules press Enter: refresh data 2) ulimitulimit-: show the user's system limit parameter ulimit-Hn <num>: Change the maximum number of Hard open files ulimit-Sn <num>: Change the maximum number of Soft open files 3) vmstatvmstat 5-S m: refresh vmstat data (unit: m) process 1) ps aux: displays all user process details ps-ef: show all user process details another style if not all display can be widened through-w, such as ps aux-www Network 1) netstat-na: show all network connections netstat-nap: show all network connections and process-related information netstat-nat: show all tcp network connections netstat-ln: show all network connection storage in listening status 1) df-h: hard Disk Storage overall situation 2) du -- max-depth = 1-h <path>: specify the size of all folders in the path (recursive layer) 3) du-sh <path>: the memory size of the specified directory is free-m. It is worth noting that: idle memory = free + buffers + cached = total-usedJVM 1) jstatjstat-gccapacity <jpid>: remaining status jstat-gcutil in each JVM region <jpid>: jstat-gccause in each JVM region <jpid>: the reason why jstat-gcutil base is added with gc can also be used to specify the update frequency, for example,-h5 1 s: update every second, and add the header to display every five lines. 2) the jps is currently running java Process. 3) jmap-dump: format = B, file = jmap. log <jpid>: generate the heap dump file jmap-heap <jpid>: displays the overall jvm heap situation jmap-histo: live <jpid>: displays memory usage of class instances 4) jstack-l <jpid>: displays thread congestion and deadlocks.