Difference between revisions of "sysstat"

From Noah.org
Jump to navigationJump to search
m (moved Sar notes to sysstat)
m
Line 1: Line 1:
 
[[Category:Engineering]]
 
[[Category:Engineering]]
  
== sar package ==
+
== iostat ==
  
Under Ubuntu the sar command is part of the '''sysstat''' package. Do not confuse this with '''atsar''', which is obsolete and unmaintained.
+
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):
 +
<pre>
 +
iostat 10 2
 +
</pre>
 +
 
 +
== sar ==
 +
=== 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"'''.
 
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 ==
+
=== '''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.
 
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.

Revision as of 15:06, 4 December 2013


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

sar

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.