1SADC(8) Linux User's Manual SADC(8)
2
3
4
6 sadc - System activity data collector.
7
9 /usr/lib/sa/sadc [ -d ] [ -F ] [ -I ] [ -L ] [ -V ] [ interval [ count
10 ] ] [ outfile ]
11
13 The sadc command samples system data a specified number of times (
14 count ) at a specified interval measured in seconds ( interval ). It
15 writes in binary format to the specified outfile or to the standard
16 output. If outfile is set to -, then sadc uses the standard system
17 activity daily data file, the /var/log/sa/sadd file, where the dd
18 parameter indicates the current day. By default sadc collects all the
19 data available from the kernel. Exceptions are interrupts and disks
20 data, for which the relevant options must be explicitly passed to sadc
21 (see options below).
22
23 When the count parameter is not specified, sadc writes its data end‐
24 lessly. When both interval and count are not specified, a dummy
25 record, which is used at system startup to mark the time when the
26 counter restarts from 0, will be written. For example, one of the sys‐
27 tem startup script may write the restart mark to the daily data file by
28 the command entry:
29
30 /usr/lib/sa/sadc -
31
32 The sadc command is intended to be used as a backend to the sar com‐
33 mand.
34
35 Note: The sadc command only reports on local activities.
36
37
39 -d Tell sadc to report statistics for disks. By default sadc does
40 not report disks activity to prevent data files from growing too
41 large.
42
43 -F The creation of outfile will be forced. If the file already
44 exists and has not the format expected by sadc then it will be
45 truncated. This may be particularly useful for daily data files
46 created by an older version of sadc and whose format is no
47 longer compatible with current one.
48
49 -I Tell sadc to report statistics for all system interrupts. By
50 default sadc only reports statistics for the total number of
51 interrupts.
52
53 -L sadc will try to get an exclusive lock on the outfile before
54 writing to it or truncating it. Failure to get the lock is
55 fatal, except in the case of trying to write a normal (i.e. not
56 a dummy and not a header) record to an existing file, in which
57 case sadc will try again at the next interval. Usually, the only
58 reason a lock would fail would be if another sadc process were
59 also writing to the file. This can happen when cron is used to
60 launch sadc . If the system is under heavy load, an old sadc
61 might still be running when cron starts a new one. Without lock‐
62 ing, this situation can result in a corrupted system activity
63 file.
64
65 -V Print version number then exit.
66
67
69 The sadc command takes into account the following environment variable:
70
71
72 S_TIME_DEF_TIME
73 If this variable exists and its value is UTC then sadc will save
74 its data in UTC time. sadc will also use UTC time instead of
75 local time to determine the current daily data file located in
76 the /var/log/sa directory.
77
79 /usr/lib/sa/sadc 1 10 /tmp/datafile
80 Write 10 records of one second intervals to the /tmp/datafile
81 binary file.
82
84 /proc filesystem must be mounted for the sadc command to work.
85
86 All the statistics are not necessarily available, depending on the ker‐
87 nel version used.
88
90 /var/log/sa/sadd
91 Indicate the daily data file, where the dd parameter is a number
92 representing the day of the month.
93
94 /proc contains various files with system statistics.
95
97 Sebastien Godard (sysstat <at> wanadoo.fr)
98
100 sar(1), sa1(8), sa2(8), sadf(1), mpstat(1), iostat(1), vmstat(8)
101
102 http://perso.orange.fr/sebastien.godard/
103
104
105
106Linux JUNE 2006 SADC(8)