~ubuntu-branches/ubuntu/gutsy/sysstat/gutsy-backports

« back to all changes in this revision

Viewing changes to man/sadf.1

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2007-05-03 11:05:07 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070503110507-myx4tgq3em3dndbb
Tags: 7.1.4-1
New upstream version.

Show diffs side-by-side

added added

removed removed

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