1SADF(1) Linux User's Manual SADF(1)
2
3
4
6 sadf - Display data collected by sar in multiple formats.
7
9 sadf [ -d | -D | -H | -p | -x ] [ -t ] [ -V ] [ -P { cpu | ALL } ] [ -s
10 [ hh:mm:ss ] ] [ -e [ hh:mm:ss ] ] [ -- sar_options... ] [ interval [
11 count ] ] [ datafile ]
12
14 The sadf command is used for displaying the contents of data files cre‐
15 ated by the sar(1) command. But unlike sar, sadf can write its data in
16 many different formats. The default format is one that can easily be
17 handled by pattern processing commands like awk (see option -p).
18
19 The sadf command extracts and writes to standard output records saved
20 in the datafile file. This file must have been created by a version of
21 sar which is compatible with that of sadf. If datafile is omitted,
22 sadf uses the standard system activity file, the /var/log/sa/sadd file,
23 where the dd parameter indicates the current day.
24
25 The interval and count parameters are used to tell sadf to select count
26 records at interval second intervals. If the count parameter is not
27 set, then all the records saved in the data file will be displayed.
28
29 All the activity flags of sar may be entered on the command line to
30 indicate which activities are to be reported. Before specifying them,
31 put a pair of dashes (--) on the command line in order not to confuse
32 the flags with those of sadf. Not specifying any flags selects only
33 CPU activity.
34
35
37 -D This option is equivalent to option -d below, except that the
38 timestamp is always expressed in seconds since the epoch
39 (00:00:00 UTC 01/01/1970).
40
41 -d Print the contents of the data file in a format that can easily
42 be ingested by a relational database system. The output consists
43 of fields separated by a semicolon. Each record contains the
44 hostname of the host where the file was created, the interval
45 value (or -1 if not applicable), the timestamp in a form easily
46 acceptable by most databases, and additional semicolon separated
47 data fields as specified by sar_options command line options.
48 Note that the timestamp is displayed in UTC (Coordinated Univer‐
49 sal Time) unless option -t is used. In this latter case, the
50 timestamp is displayed in local time.
51
52 -e [ hh:mm:ss ]
53 Set the ending time of the report, given in local time. The
54 default ending time is 18:00:00. Hours must be given in 24-hour
55 format. This option is ignored when option -x is used.
56
57 -H Display the header of the data file.
58
59 -P { cpu | ALL }
60 Tell sadf that processor dependent statistics are to be reported
61 only for the specified processor or processors. Specifying the
62 ALL keyword reports statistics for each individual processor,
63 and globally for all processors. Note that processor 0 is the
64 first processor.
65
66 -p Print the contents of the data file in a format that can easily
67 be handled by pattern processing commands like awk. The output
68 consists of fields separated by a tab. Each record contains the
69 hostname of the host where the file was created, the interval
70 value (or -1 if not applicable), the timestamp (UTC value -
71 Coordinated Universal Time) in seconds from the epoch, the
72 device name (or - if not applicable), the field name and its
73 value.
74
75 -s [ hh:mm:ss ]
76 Set the starting time of the data (given in local time), causing
77 the sadf command to extract records time-tagged at, or follow‐
78 ing, the time specified. The default starting time is 08:00.
79 Hours must be given in 24-hour format. This option is ignored
80 when option -x is used.
81
82 -t When this option is used together with options -d or -x, the
83 timestamp is displayed in local time instead of UTC (Coordinated
84 Universal Time). This option is ignored when options -p or -D
85 are used.
86
87 -V Print version number then exit.
88
89 -x Print the contents of the data file in XML format. Every activ‐
90 ity and the whole file contents will be displayed. Timestamps
91 are displayed in UTC (Coordinated Universal Time) unless option
92 -t is used, in which case they are displayed in local time. The
93 corresponding DTD (Document Type Definition) is included in the
94 sysstat source package. It is also available at
95 http://perso.orange.fr/sebastien.godard/sysstat.dtd
96
97
99 The sadf command takes into account the following environment variable:
100
101
102 S_TIME_DEF_TIME
103 If this variable exists and its value is UTC then sadf will use
104 UTC time instead of local time to determine the current daily
105 data file located in the /var/log/sa directory.
106
108 sadf -d /var/log/sa/sa21 -- -r -n DEV
109 Extract memory, swap space and network statistics from system
110 activity file 'sa21', and display them in a format that can be
111 ingested by a database.
112
113 sadf -p -P 1
114 Extract CPU statistics for processor 1 (the second processor)
115 from current daily data file, and display them in a format that
116 can easily be handled by a pattern processing command.
117
118
120 /var/log/sa/sadd
121 Indicate the daily data file, where the dd parameter is a number
122 representing the day of the month.
123
124
126 Sebastien Godard (sysstat <at> wanadoo.fr)
127
129 sar(1), sadc(8), sa1(8), sa2(8), isag(1), mpstat(1), iostat(1),
130 vmstat(8)
131
132 http://perso.orange.fr/sebastien.godard/
133
134
135
136Linux JULY 2006 SADF(1)