Linux "sadc" Command Line Options and Examples
System activity data collector.

The sadc command samples system data a specified number of times (count) at a specified interval measured in seconds (interval). It writes in binary format to the specified outfile or to standard output. If outfile is set to -, then sadc uses the standard system activity daily data file (see below).


/usr/lib/sysstat/sadc [ -C comment ] [ -D ] [ -F ] [ -L ] [ -V ] [ -S { DISK | INT | IPV6 | POWER | SNMP |
    XDISK | ALL | XALL [,...] } ] [ interval [ count ] ] [ outfile ]

Command Line Options:

When neither the interval nor the count parameters are specified, this option tells sadc to write adummy record containing the specified comment string. This comment can then be displayed with option
sadc -C ...
Use saYYYYMMDD instead of saDD as the standard system activity daily data file name.
sadc -D ...
Specify which optional activities should be collected by sadc. Some activities are optional to preventdata files from growing too large. The DISK keyword indicates that sadc should collect data for blockdevices. The INT keyword indicates that sadc should collect data for system interrupts. The IPV6 key‐word indicates that IPv6 statistics should be collected by sadc. The POWER keyword indicates that sadcshould collect power management statistics. The SNMP keyword indicates that SNMP statistics should becollected by sadc. The ALL keyword is equivalent to specifying all the keywords above and thereforeall previous activities are collected.The XDISK keyword is an extension to the DISK one and indicates that partitions and filesystems statis‐tics should be collected by sadc in addition to disk statistics. This option works only with kernels2.6.25 and later. The XALL keyword is equivalent to specifying all the keywords above (including key‐word extensions) and therefore all possible activities are collected.Important note: The activities (including optional ones) saved in an existing data file prevail overthose selected with option -S. As a consequence, appending data to an existing data file will resultin option -S being ignored.
sadc -S ...
ENVIRONMENTThe sadc command takes into account the following environment variable:S_TIME_DEF_TIMEIf this variable exists and its value is UTC then sadc will save its data in UTC time. sadc will alsouse UTC time instead of local time to determine the current daily data file located in the/var/log/sysstat directory.EXAMPLES/usr/lib/sysstat/sadc 1 10 /tmp/datafileWrite 10 records of one second intervals to the /tmp/datafile binary file./usr/lib/sysstat/sadc -C Backup_Start /tmp/datafileInsert the comment Backup_Start into the file /tmp/datafile.BUGSThe /proc filesystem must be mounted for the sadc command to work.All the statistics are not necessarily available, depending on the kernel version used. sadc assumes that youare using at least a 2.6 kernel.FILES/var/log/sysstat/saDD/var/log/sysstat/saYYYYMMDDThe standard system activity daily data files and their default location. YYYY stands for the currentyear, MM for the current month and DD for the current day./proc and /sys contain various files with system statistics.AUTHORSebastien Godard (sysstat <at>
sadc -V ...