Linux System performance Monitoring

Source: Internet
Author: User
Tags cpu usage

View CPU Usage $sar-Ueg: $sar-U1 2[/home/weber#]sar-u1 2Linux2.6. *- A-generic-pae (Myvps) ./ -/ the_i686_ (1CPU) the:Geneva: -AM CPU%user%nice%system%iowait%steal%Idle the:Geneva:xxAM All0.00      0.00      0.50      0.00      0.00     99.50 the:Geneva: onAM All0.00      0.00      0.00      0.00      0.00    100.00The following two parameters indicate the frequency of the monitoring, such as 1 and 2 in the example, which is sampled once per second and sampled 2 times in total; View CPU average load $sar-Q1 2SAR designationAfter-Q, you can see the number of processes in the running queue, the process size on the system, the average load, etc.
view Memory View memory usage SAR designations-after R, you can see the memory usage status; $sar-R1 2 the: ,: -AM kbmemfree kbmemused%memused kbbuffers kbcached kbcommit%Commit kbactive Kbinact the: ,: theAm17888    359784     95.26     37796     73272    507004     65.42    137400    150764 the: ,: -Am17888    359784     95.26     37796     73272    507004     65.42    137400    150764Average:17888    359784     95.26     37796     73272    507004     65.42    137400    150764View Memory usage $free-M
--sh  -h is humanized display S is the size of the recursive entire directory to view the sorted size of all folders under this directory  for in do du-sh $i; |  -sh ' ls '
integrated applications when SAR is not available in the system, the following tools can be used instead: Linux has vmstat, UNIX systems have Prstateg: View CPU, Memory, usage: vmstat N m (n is the monitoring frequency, M is the number of monitors) [/home/weber#]vmstat1 3procs-----------Memory-------------Swap-------io-----system------CPU----r b swpd free buff cache si so bi boinchCS US sy ID WA0  0  86560  42300   9752  63556    0    1     1     1    0    0  0  0  About  01  0  86560  39936   9764  63544    0    0     0     the    the    the  5  0  the  00  0  86560  42168   9772  63556    0    0     0     -  127  231  -  2  -  0Use the Watch tool to monitor changes when a data change is required for a continuous monitoring application, the Watch tool meets the requirements, and after the watch command is executed, it enters an interface to output the currently monitored data, which is highlighted when the data changes; eg: when working with Redis , monitor memory changes: $watch-d-n1 './REDIS-CLI Info | grep memory'(The following is the interface content in the Watch tool, once the memory changes, that is, the real-time highlighting changes) every1.0s:./redis-cli info | grep memory Mon APR -  -:Ten: $  theused_memory:45157376Used_memory_human:43.07MUsed_memory_rss:47628288Used_memory_peak:49686080Used_memory_peak_human:47.38M

Linux System performance Monitoring

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.