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
The installation of Ubuntu software can be easily installed through the software ce
The sl command is a fun command set in the Linux system. Many people use the ls com
If you want to display the contents of multiple files at the same time in Linux sys
MBR is the boot information of the system. The MBR information in the Linux system
Ubuntu14.04 does not support U disk exfat format how to do?
How to solve the Linux system Tail command prompt No space left on device problem
What if the Linux partition read-only causes the database to stop writing data?
How to mount/uninstall USB devices using commands under Linux
How to use the CRT command tool to view Linux system resource information
Linux to create file or directory soft links, hard link skills
Linux can not completely remove LibreOffice how to solve?
Linux system uses commands to maintain RHCS method
Linux uses S3QL to create an encrypted file system
Linux error when reporting a scheduled task -bash:crontab:command?
Win10 system blue screen error code 0x00000133 solution
What is the format of DXF? What software is used to open DXF files
How to fix failures that WinXP system cannot update
Teach you to crack Android phone OTG function
Solved MSN cannot log in due to "0x81000370" error
How to modify the default web port of apache
How to use the LAN sharing setting tool Win7 LAN sharing setting method
Win10 or will change the upgrade mode Security and feature patches are treated separately