Quantcast
Channel: Linux and Mac Hacks
Viewing all articles
Browse latest Browse all 39

Enable sar on Ubuntu

$
0
0
System Activity Report (sar) is a utility that lets you measure performance on *nix machines.

sar comes in the sysstat package and includes:
 - sar: collects and reports system activity information;
- iostat: reports CPU utilization and disk I/O statistics;
- mpstat: reports global and per-processor statistics;
- pidstat: reports statistics for Linux tasks (processes);
- sadf: displays data collected by sar in various formats.
Here is more about sar:

  • http://en.wikipedia.org/wiki/Sar_(Unix)
  • http://www.linuxjournal.com/content/sysadmins-toolbox-sar
To install sar on Ubuntu do the following:

get the systat package:
apt-get -y install sysstat
enable the package, edit /etc/default/sysstat and set
enabled="true"
if you want it to run every x minutes edit /etc/cron.d/sysstat and change the following line:
5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1
restart sar: 
service sysstat restart

after a couple minutes you can view the status by typing 
sar -A

Viewing all articles
Browse latest Browse all 39

Trending Articles