Sunday, 17 April 2016

How to monitor Linux performance using SAR ?


SAR
  a. Monitor system real time performance (CPU, Memory, I/O, etc)
  b. Collect performance data in the background and do analysis on the historical data to identify bottlenecks

Sar is part of the sysstat package.

Features
  • Collective CPU usage
  • Individual CPU statistics
  • Memory used and available
  • Swap space used and available
  • Overall I/O activities of the system
  • Individual device I/O activities
  • Context switch statistics
  • Run queue and load average data
  • Network statistics
  • Report sar data from a specific time

Example
Display the system CPU statistics 3 times (with 1 second interval)
sar -b” command reports I/O statistics.
“1 3″ indicates that the sar -b will be executed for every 1 second for a total of 3 times.

$ sar -b 1 3
Linux 2.6.18-194.el5PAE (dev-db)     03/26/2011      _i686_  (8 CPU)
01:56:28 PM       tps      rtps      wtps   bread/s   bwrtn/s
01:56:29 PM    346.00    264.00     82.00   2208.00    768.00
01:56:30 PM    100.00     36.00     64.00    304.00    816.00
01:56:31 PM    282.83     32.32    250.51    258.59   2537.37
Average:       242.81    111.04    131.77    925.75   1369.90

No comments:

Post a Comment

Note: only a member of this blog may post a comment.