Linux system monitoring parameters

Source: Internet
Author: User
View the number of CPU cores for Linux system monitoring parameters cat/proc/cpuinfo | grep & quot; cpucores & quot; | uniq view CPU model cat/proc/cpuinfo | grep & amp; #39; modelname & amp; #39; | uniq view total memory cat/proc/meminfo | grepMemTotal. linux system monitoring parameter viewing CPU cores cat/proc/cpuinfo | grep "cpu cores" | uniq viewing CPU model cat/proc/cpuinfo | grep 'model name' | uniq viewing total memory cat /proc/meminfo | grep MemTotal View Disk size fdisk-l | grep Disk process and Port View all processes and port usage: netstat-apn or netstat-tnl check port usage: Netstat-apn grep 8080 port concurrent connection: netstat-n | grep 80 | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print a, S [a]} 'view Tomcat process: ps-aux | grep tomcat view nginx concurrent (number of connections) process count: ps-ef | grep nginx | wc-l check the number of established connections in the network connection status: netstat-na | grep ESTABLISHED | wc-l check the number of connections in various states of the system tcp connection netstat-an | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print a, S [a]} 'output the number of connections to each ip address and the total number of connections in each status. Netstat-n | awk '/^ tcp/{n = split ($ (NF-1), array, ":"); if (n <= 2) ++ S [array [(1)]; else ++ S [array [(4)]; ++ s [$ NF]; ++ N} END {for (a in S) {printf ("%-20 s % s \ n", a, S [a]); + + I} printf ("%-20 s % s \ n", "TOTAL_IP", I); for (a in s) printf ("%-20 s % s \ n", a, s [a]); printf ("%-20 s % s \ n", "TOTAL_LINK ", N );} 'disk management df-hl View disk usage df-hl view remaining disk space df-h view partition size of each root path du-sh [directory name] return the size of the directory du -sm [folder] returns the total number of MB in the folder. find [folder]-type f-print | wc-l queries the number of files in the directory.
Related Article

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.