Summary of essential linux commands for fire fighting (1) ------ query Problems

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.