table of contents
other versions
- wheezy 10.0.5-1
- jessie 11.0.1-1
- testing 11.4.3-2
- unstable 11.4.3-2
- experimental 11.5.6-1
SADC(8) | Linux User's Manual | SADC(8) |
NAME¶
sadc - System activity data collector.SYNOPSIS¶
/usr/lib/sysstat/sadc [ -C comment ] [ -S { INT | DISK | SNMP | IPV6 | POWER | XDISK | ALL | XALL } ] [ -F ] [ -L ] [ -V ] [ interval [ count ] ] [ outfile ]DESCRIPTION¶
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, the /var/log/sysstat/sadd file, where the dd parameter indicates the current day. In this case, sadc will overwrite the file if it is from a previous month. By default sadc collects all the data available from the kernel. Exceptions are interrupts and disk data, for which the relevant options must be explicitly passed to sadc (see options below).OPTIONS¶
- -C comment
- When neither the interval nor the count parameters are specified, this option tells sadc to write a dummy record containing the specified comment string. This comment can then be displayed with option -C of sar.
- -F
- The creation of outfile will be forced. If the file already exists and has a format unknown to sadc then it will be truncated. This may be useful for daily data files created by an older version of sadc and whose format is no longer compatible with current one.
- -L
- sadc will try to get an exclusive lock on the outfile before writing to it or truncating it. Failure to get the lock is fatal, except in the case of trying to write a normal (i.e. not a dummy and not a header) record to an existing file, in which case sadc will try again at the next interval. Usually, the only reason a lock would fail would be if another sadc process were also writing to the file. This can happen when cron is used to launch sadc. If the system is under heavy load, an old sadc might still be running when cron starts a new one. Without locking, this situation can result in a corrupted system activity file.
- -S { INT | DISK | SNMP | IPV6 | POWER | XDISK | ALL | XALL }
- Specify which optional activities should be collected by
sadc. Some activities are optional to prevent data files from
growing too large. The INT keyword indicates that sadc
should collect data for system interrupts. The DISK keyword
indicates that sadc should collect data for block devices. The
SNMP and IPV6 keywords indicate respectively that SNMP and
IPv6 statistics should be collected by sadc. The POWER
keyword indicates that sadc should collect power management
statistics. The ALL keyword is equivalent to specifying all the
keywords above and therefore all previous activities are collected.
- -V
- Print version number then exit.
ENVIRONMENT¶
The sadc command takes into account the following environment variable:- S_TIME_DEF_TIME
- If this variable exists and its value is UTC then sadc will save its data in UTC time. sadc will also use 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.
Insert the comment Backup_Start into the file
/tmp/datafile.
BUGS¶
The /proc filesystem must be mounted for the sadc command to work.FILES¶
/var/log/sysstat/saddIndicate the daily data file, where the
dd parameter is a number representing the day of the month.
/proc contains various files with system statistics.
AUTHOR¶
Sebastien Godard (sysstat <at> orange.fr)SEE ALSO¶
sar(1), sa1(8), sa2(8), sadf(1), sysstat(5)MAY 2012 | Linux |