sysstat

From Noah.org
Revision as of 16:52, 26 March 2014 by Root (talk | contribs)
Jump to navigationJump to search


You might also want to look at the dstat package, which has replacements for many of the commands in sysstat.

iostat

When you run iostat without any arguments it shows average statistics since the last boot. If your server has been on for years then this isn't going to be very useful. Instead, you need to give iostat a time interval to average and the number of times to report. You need to ask for at least two reports because the first shows the average since last boot. For example, the following averages over 10 seconds and prints two reports (report average since boot and report average over last 10 seconds):

iostat 10 2

It is often useful to filter out the devices that have zero input and output since the last report. Equivalent to iostat 3 | egrep -v "[0]+space:+[0]+$".

iostat -z 3
<pre>
If you are working with a virtualization system using LVM then it's very useful to see the device mapper name instead of device name. This makes it easier to see which guest is using IO.
<pre>
iostat -z -N 3

sar

"sysstat" is the best package to find sar

Under Ubuntu the sar command is part of the sysstat package. Do not confuse this with atsar, which is obsolete and unmaintained.

After sysstat in installed be sure to enable data collection by editing /etc/default/sysstat and setting ENABLED="true".

Requested activities not available in file

This happens most often when sysstat was not configured to record the given data. For example, `sar -b` or `sar -d`. You must edit /etc/cron.d/sysstat and add the option to store the given dataset.