Difference between revisions of "Sar"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
(how to turn the results into graphs)
Line 38: Line 38:
  
 
= See also =
 
= See also =
* [[ksar]]
+
* [[ksar]] - how to turn the results into graphs
 +
* [http://www.trickytools.com/php/sar2rrd.php sar2rrd] - how to turn the results into graphs
 
* [[vmstat]]
 
* [[vmstat]]
 
* [[iostat]]
 
* [[iostat]]
 
* [[top]]
 
* [[top]]
 
* [[diagnostics]]
 
* [[diagnostics]]

Revision as of 11:08, 15 March 2011

sar allows you to monitor your computer resources' usage over a time frame.

Examples

CPU statistics

tweedleburg:~ # sar 10
Linux 2.6.32.12-0.7-default (tweedleburg)    12/05/2010      _x86_64_ 

05:05:02 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
05:05:12 AM     all      7.16      0.00      0.79      0.00      0.00     92.04
05:05:22 AM     all      7.05      0.00      0.77      0.02      0.00     92.16

network and ram

The following collects data for RAM (-r) and network (-n) all 10 seconds

tweedleburg:~ # sar -r -n DEV 10
Linux 2.6.32.12-0.7-default (tweedleburg)    12/05/2010      _x86_64_

05:23:09 AM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
05:23:19 AM  42832588   6586776     13.33    284956   3922980   1816792      3.68

05:23:09 AM     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
05:23:19 AM        lo      1.51      1.51      0.18      0.18      0.00      0.00      0.00
05:23:19 AM      eth0     37.10      1.71      3.51      0.25      0.00      0.00      0.00
05:23:19 AM      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
05:23:19 AM      eth2     24.70     17.94      3.59      2.80      0.00      0.00      0.10
05:23:19 AM      eth3      0.00      0.00      0.00      0.00      0.00      0.00      0.00

05:23:19 AM kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
05:23:29 AM  42828780   6590584     13.34    284964   3922980   1820588      3.68

05:23:19 AM     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
05:23:29 AM        lo      2.05      2.05      0.21      0.21      0.00      0.00      0.00
05:23:29 AM      eth0     40.02      6.46      3.87      6.09      0.00      0.00      0.00
05:23:29 AM      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
05:23:29 AM      eth2     17.03      9.78      2.14      1.53      0.00      0.00      0.10
05:23:29 AM      eth3      0.00      0.00      0.00      0.00      0.00      0.00      0.00

See also