Starting sadc/sar directly

If your problem requires data collection that is not covered by the sar/sadc defaults, you can start the tools manually. Start the tools manually, for example, when you need a smaller sampling interval than the default.

About this task

The sampling interval depends on the time period during which performance problems are seen. You can use a default sampling interval of 10 minutes. If performance problems occur for a couple of minutes occasionally, shorten the sampling interval to less than a minute.

Procedure

  1. To start the sadc command directly, issue a command of the following form:
    /usr/lib64/sa/sadc [options] [interval [count] > <sadc_outfile>
    See the sadc man page for details.
    For example:
    [root@system:]#  /usr/lib64/sa/sadc 1 5 > sadc_outfile
    [root@system:]#  /usr/lib64/sa/sadc -S DISK 10 > sadc_outfile

    Omit the count parameter to let sadc sample data until it is stopped.

    Use the -S DISK option to collect disk statistics. By default sadc does not report disks activity to prevent data files from growing too large.

    Note: In Ubuntu, the sadc tool is located in the /usr/lib/sysstat/sadc directory. Hence, issue a command of the following form:
    /usr/lib/sysstat/sadc [options] [interval [count] > <sadc_outfile>
  2. Extract data and write records by using the sar command.
    Use a command of the following form:
    sar -A -f <sadc outfile> > <sar outfile>
    For example:
    [root@system:]#  sar -A -f sadc_outfile > sar_outfile
    where:
    -A
    reports all the collected statistics.
    -f
    specifies the binary input file.
    The sar command creates a collection of performance reports from the collected sadc data and writes these reports to an output file.

Results

To report performance data, include both the sadc and the sar data files with the problem report.

What to do next

After you collect the diagnostic data, you can complete the following tasks, as appropriate: