1 .TH SADC 8 "JULY 2018" Linux "Linux User's Manual" -*- nroff -*-
3 sadc \- System activity data collector.
5 .B /usr/lib64/sa/sadc [ -C
7 .B ] [ -D ] [ -F ] [ -L ] [ -V ] [ -S { keyword [,...] | ALL | XALL } ] [
17 command samples system data a specified number of times
18 (\fIcount\fR) at a specified interval measured in seconds
19 (\fIinterval\fR). It writes in binary format to the specified
21 or to standard output. If
25 uses the standard system activity daily data file (see below).
26 In this case, if the file already exists,
28 will overwrite it if it is from a previous month.
31 collects most of the data available from the kernel.
32 But there are also optional metrics, for which the
33 relevant options must be explicitly passed to
35 to be collected (see option -S below).
37 The standard system activity daily data file is named
41 is used, in which case its name is
43 where YYYY stands for the current year, MM for the current month
44 and DD for the current day.
45 By default it is located in the
47 directory. Yet it is possible to specify an alternate location for
50 is a directory (instead of a plain file) then it will be considered
51 as the directory where the standard system activity daily data file
56 parameter is not specified,
58 writes its data endlessly.
63 are not specified, and option -C is not used,
64 a dummy record, which is used at system startup to mark
65 the time when the counter restarts from 0, will be written.
66 For example, one of the system startup script may write the restart mark to
67 the daily data file by the command entry:
69 .B "/usr/lib64/sa/sadc -"
73 command is intended to be used as a backend to the
79 command only reports on local activities.
87 parameters are specified, this option tells
89 to write a dummy record containing the specified
92 This comment can then be displayed with option -C of
99 as the standard system activity daily data file name.
103 will be forced. If the file already exists and has a format unknown to
105 then it will be truncated. This may be useful for daily data files
106 created by an older version of
108 and whose format is no longer compatible with current one.
111 will try to get an exclusive lock on the
113 before writing to it or truncating it. Failure to get the lock is fatal,
114 except in the case of trying to write a normal (i.e. not a dummy and not
115 a header) record to an existing file, in which case
117 will try again at the next interval. Usually, the only reason a lock
118 would fail would be if another
120 process were also writing to the file. This can happen when cron is used
123 If the system is under heavy load, an old
125 might still be running when cron starts a new one. Without locking,
126 this situation can result in a corrupted system activity file.
127 .IP "-S { keyword [,...] | ALL | XALL }"
128 Possible keywords are DISK, INT, IPV6, POWER, SNMP, XDISK, ALL, and XALL.
130 Specify which optional activities should be collected by
132 Some activities are optional to prevent data files from growing too large.
135 keyword indicates that
137 should collect data for block devices.
140 keyword indicates that
142 should collect data for system interrupts.
145 keyword indicates that IPv6 statistics should be
150 keyword indicates that
152 should collect power management statistics.
155 keyword indicates that SNMP statistics should be
160 keyword is equivalent to specifying all the keywords above and therefore
161 all previous activities are collected.
165 keyword is an extension to the
167 one and indicates that partitions and filesystems statistics should be collected by
169 in addition to disk statistics. This option works only with kernels 2.6.25
173 keyword is equivalent to specifying all the keywords above (including
174 keyword extensions) and therefore all possible activities are collected.
176 Important note: The activities (including optional ones) saved in an existing
177 data file prevail over those selected with option -S.
178 As a consequence, appending data to an existing data file will result in
179 option -S being ignored.
181 Print version number then exit.
186 command takes into account the following environment variable:
189 If this variable exists and its value is
193 will save its data in UTC time.
195 will also use UTC time instead of local time to determine the current
196 daily data file located in the
200 .B /usr/lib64/sa/sadc 1 10 /tmp/datafile
202 Write 10 records of one second intervals to the /tmp/datafile binary file.
205 .B /usr/lib64/sa/sadc -C Backup_Start /tmp/datafile
207 Insert the comment Backup_Start into the file /tmp/datafile.
212 filesystem must be mounted for the
216 All the statistics are not necessarily available, depending on the kernel version used.
218 assumes that you are using at least a 2.6 kernel.
222 .I /var/log/sa/saYYYYMMDD
224 The standard system activity daily data files and their default location.
225 YYYY stands for the current year, MM for the current month and DD for the
232 contain various files with system statistics.
234 Sebastien Godard (sysstat <at> orange.fr)
242 .I https://github.com/sysstat/sysstat
244 .I http://pagesperso-orange.fr/sebastien.godard/