How Linux uses commands in sysstat

  
                

sysstat is a software package with various practical system tools, such as system performance testing tools. To use sysstat, you need to know the commands in sysstat. The following small series teaches you how to use sysstat in Linux. command.

a, the last two parameters are generally sar interval count

1, sar -u 1 5

statistical information output from the CPU usage, per second Output once, a total of 5 output

[root@stage1-new9 sysstat-10.0.5]# sar -u 1 5

Linux 2.6.9-67.ELsmp (stage1-new9. Intra99bill.com) 06/12/2012 _x86_64_ (8 CPU)

11:34:43 AM CPU %user %nice %system %iowait %steal %idle

11:34:44 AM all 0.00 0.00 0.00 0.00 0.00 100.00

11:34:45 AM all 0.00 0.00 0.12 0.00 0.00 99.88

11:34:46 AM all 0.00 0.00 0.00 0.00 0.00 100.00

11:34:47 AM all 0.00 0.00 0.12 0.00 0.00 99.88

11:34:48 AM all 0.00 0.00 0.00 0.00 0.00 100.00

Average: all 0.00 0.00 0.05 0.00 0.00 99.95< Br>

CPU all means that the statistics are the average of all CPUs.

%user Shows the percentage of total CPU usage running at the user level (application).

%nice Displays the percentage of total CPU time spent at the user level for the nice operation.

%system The percentage of total CPU time spent running at the kernel level (kernel).

%iowait Shows the percentage of total CPU time spent waiting for I/O operations.

%steal The percentage of the hypervisor that waits for a virtual CPU to service another virtual process.

%idle Shows the percentage of total CPU time spent by CPU idle time.

Tips:

If the value of %iowait is too high, it means that the hard disk has an I/O bottleneck

If the value of %idle is high but the system response is slow, it may be The CPU waits for memory allocation. In this case, the memory capacity should be increased.

If the value of %idle continues to be lower than 10, the system's CPU processing capacity is relatively low, indicating that the most needed resource in the system is the CPU.

2, sar -b 1 5

Display statistics on I/O and transfer rate

17:09:07 tps rtps wtps bread/s bwrtn/s

17:09:08 3.12 3.12 0.00 25.00 0.00

17:09:09 89.58 6.25 83.33 141.67 733.33

17:09:10:42.71 9.38 33.33 141.67 600.00

17:09:11 2.11 2.11 0.00 16.84 0.00

17:09:12:1.04 0.00 1.04 0.00 175.00

Average: 27.77 4.18 23.59 65.14 302.30

tps Total I/O transfer per physical device per second

rtps Total amount of data read from physical device per second

wtps Write to physical device every second Total amount of data entered

bread/s The amount of data read from the physical device per second, in blocks/s

bwrtn/s Data written to physical devices per second Quantity, the unit is block /s
Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved