Linux upgrade monitoring-sysstat

Source: Internet
Author: User

1. Install
./Configure
Make
Make install

2. Introduction to SAR commands
Sar-H
Usage: SAR [Options] [<time interval> [<times>]
Main options and reports:
-B I/O and transmission rate information
-B paging status
-D Block device status
-I {<interrupt> | sum | all | xall}
Interruption Information Status
-M Power Supply Management Information
-N {<keyword> [,...] | all}
Network statistics
Key words can be:
Dev Nic
Edev nic (error)
NFS client
Nfsd NFS server
Sock Sockets (socket) (V4)
IP address stream (V4)
EIP stream (V4) (error)
ICMP stream (V4)
Eicmp ICMP stream (V4) (error)
TCP stream (V4)
Etcp TCP stream (V4) (error)
UDP stream (V4)
Sock6 Sockets (socket) (V6)
Ip6 IP stream (V6)
Eip6 IP stream (V6) (error)
Icmp6 ICMP stream (V6)
Eicmp6 ICMP stream (V6) (error)
UDP6 UDP stream (V6)
-Q queue length and average load
-R memory usage
-R memory condition
-S swap space utilization
-U [all]
CPU utilization
-V kernel Table Status
-W task creation and System Conversion statistics
-W exchange information
-Y tty device status

========================================================== ========================================================
Example:
A. view memory
Sar-R 1 100
12: 25 minutes 01 seconds kbmemfree kbmemused % memused kbbuffers kbcached kbcommit % commit
12: 25 minutes 02 seconds 285068 742000 72.24 32744 475552 455472
Note:
Kbmemfree idle memory
Kbmemused memory usage
Kbcached cache memory
Physical memory capacity used as the cache area in the kbbuffers Kernel
Physical memory capacity used as cache in the kbcached Kernel
Free capacity of kbswpfree swap Zone
Capacity of swap zone used by kbswpused

B. View average load
Sar-Q 1 100
12 hour 43 minute 20 seconds runq-SZ plist-SZ ldavg-1 ldavg-5 ldavg-15
12: 43 minutes 21 seconds 0 253 0.00 0.00
Average time: 0 253 0.00 0.00 0.00
Note:
Runq-SZ running queue process count
Plist-SZ system process queue count
The last three items are average loads.

C. View CPU usage
Sar-u 1 3
13: 13 minutes 19 seconds CPU % USER % nice % System % iowait % steal % idle
13: 13 minutes 10 seconds all 1.01 0.00 3.02 0.00 0.00
Note:
% Steal waits for the time used by other virtual CPUs when operating system virtualization technologies such as xen are used
% Idle CPU does not wait for the idle time consumption ratio of disk I/O
% Nice the CPU time consumed by processes whose scheduling priority is changed through nice in user mode

D. view the page Switch Status
Sar-W
13: 52 minutes 56 seconds pswpin/s pswpout/s
, 52 minutes, 59 seconds, 0.00, 0.00
Note:
Pswpin/s number of inbound pages per second (SWAp in)
Number of outgoing pages per second in pswpout/s

E. Block device status
Sar-D 1 1
Average time: Dev TPS rd_sec/s wr_sec/s avgrq-SZ avgqu-SZ await svctm % util
Average time: dev1-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Average time: dev2-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Average time: dev2-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Note:
Dev device name
Tps I/O traffic per second. One transmission is an I/O request. Multiple logical requests can be merged into one physical I/O Request.
Rd_sec/s number of sectors read from the device per second (1 sector = 512 bytes)
Wr_sec/S: number of sectors written to the device per second.
Avgrq-SZ average data size of each device I/O operation (unit: Sector)
Avgqu-SZ average I/O queue length.
Average await wait time for each device I/O operation (MS)
Average svctm service time per device I/O operation (MS)
% Util has a fraction of the time in one second for I/O operations.

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.