Running some basic SAR commands …

There are newer and better tools around now a days, ie the whole *top family but we starting with some basics.

1) System usage stats

sar -u 1 3
Linux 2.6.32-5-amd64 (XXXXXX) 05/02/13 _x86_64_ (1 CPU)
16:22:12 CPU %user %nice %system %iowait %steal %idle
16:22:13 all 0.00  0.00  0.00    0.00    0.00   100.00
16:22:14 all 0.00  0.00  0.99    0.00    0.00   99.01
16:22:15 all 0.00  0.00  0.00    0.00    0.00   100.00
Average: all 0.00  0.00  0.33    0.00    0.00   99.67

2) Lets see some stats per core

sar -P ALL 1 4
 Linux 2.6.32-5-amd64 (XXXXXX) 05/02/13 _x86_64_ (1 CPU)
16:06:22 CPU %user %nice %system %iowait %steal %idle
16:06:23 all 0.00  0.00  0.00    0.00    0.00   100.00
16:06:23 0   0.00  0.00  0.00    0.00    0.00   100.00
16:06:23 CPU %user %nice %system %iowait %steal %idle
16:06:24 all 0.99  0.00  0.00     0.00   0.00   99.01
16:06:24 0   0.99  0.00  0.00     0.00   0.00   99.01
16:06:24 CPU %user %nice %system %iowait %steal %idle
16:06:25 all 0.00  0.00  0.00    0.00    0.00   100.00
16:06:25 0   0.00  0.00  0.00    0.00    0.00   100.00
16:06:25 CPU %user %nice %system %iowait %steal %idle
16:06:26 all 0.00  0.00  0.00    0.00    0.00   100.00
16:06:26 0   0.00  0.00  0.00    0.00    0.00   100.00
Average: CPU %user %nice %system %iowait %steal %idle
Average: all 0.25  0.00  0.00    0.00    0.00   99.75
Average: 0   0.25  0.00  0.00    0.00    0.00   99.75

3)  and some memory stats

sar -r 1 3
 Linux 2.6.32-5-amd64 (XXXXXX) 05/02/13 _x86_64_ (1 CPU)
16:11:08 kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit
16:11:09 23300     1003592   97.73    240816    424288   2405520  47.88
16:11:10 23300     1003592   97.73    240816    424288   2405520  47.88
16:11:11 23300     1003592   97.73    240816    424288   2405520  47.88
Average: 23300     1003592   97.73    240816    424288   2405520  47.88

4) Some swap stats

sar -S 1 3
 Linux 2.6.32-5-amd64 (XXXXXXX) 05/02/13 _x86_64_ (1 CPU)
16:13:08 kbswpfree kbswpused %swpused kbswpcad %swpcad
16:13:09 3812324   185364    4.64     64416    34.75
16:13:10 3812324   185364    4.64     64416    34.75
16:13:11 3812324   185364    4.64     64416    34.75
Average: 3812324   185364    4.64     64416    34.75

5) I/O stats

sar -b 1 3
 Linux 2.6.32-5-amd64 (XXXXXX) 05/02/13 _x86_64_ (1 CPU)
16:14:06 tps  rtps wtps bread/s bwrtn/s
16:14:07 0.00 0.00 0.00 0.00    0.00
16:14:08 0.00 0.00 0.00 0.00    0.00
16:14:09 0.00 0.00 0.00 0.00    0.00
Average: 0.00 0.00 0.00 0.00    0.00

6) See some run queue stats

sar -q 1 3
 Linux 2.6.32-5-amd64 (XXXXXX) 05/02/13 _x86_64_ (1 CPU)
16:18:11 runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
16:18:12 0       180      0.00    0.00    0.00
16:18:13 0       180      0.00    0.00    0.00
16:18:14 0       180      0.00    0.00    0.00
Average: 0       180      0.00    0.00    0.00

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.