1SADF(1)                       Linux User's Manual                      SADF(1)
2
3
4

NAME

6       sadf - Display data collected by sar in multiple formats.
7

SYNOPSIS

9       sadf  [ -d | -D | -H | -p | -x ] [ -C ] [ -h ] [ -t ] [ -V ] [ -P { cpu
10       [,...] | ALL } ] [ -s [ hh:mm:ss  ]  ]  [  -e  [  hh:mm:ss  ]  ]  [  --
11       sar_options ] [ interval [ count ] ] [ datafile ]
12

DESCRIPTION

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 (CSV, XML, etc.)  The default format is one that
17       can easily be handled by pattern  processing  commands  like  awk  (see
18       option -p).
19
20       The  sadf  command extracts and writes to standard output records saved
21       in the datafile file. This file must have been created by a version  of
22       sar  which  is  compatible  with that of sadf.  If datafile is omitted,
23       sadf uses the standard system activity file, the /var/log/sa/sadd file,
24       where the dd parameter indicates the current day.
25
26       The interval and count parameters are used to tell sadf to select count
27       records at interval seconds apart. If the count parameter is  not  set,
28       then all the records saved in the data file will be displayed.
29
30       All  the  activity  flags  of sar may be entered on the command line to
31       indicate which activities are to be reported. Before  specifying  them,
32       put  a  pair of dashes (--) on the command line in order not to confuse
33       the flags with those of sadf.  Not specifying any  flags  selects  only
34       CPU activity.
35
36

OPTIONS

38       -C     Tell sadf to display comments present in file.
39
40       -D     This  option  is  equivalent to option -d below, except that the
41              timestamp  is  always  expressed  in  seconds  since  the  epoch
42              (00:00:00 UTC 01/01/1970).
43
44       -d     Print  the contents of the data file in a format that can easily
45              be ingested by a relational database system. The output consists
46              of  fields  separated  by  a semicolon. Each record contains the
47              hostname of the host where the file was  created,  the  interval
48              value  (or -1 if not applicable), the timestamp in a form easily
49              acceptable by most databases, and additional semicolon separated
50              data  fields  as  specified by sar_options command line options.
51              Note that the timestamp is displayed in UTC (Coordinated Univer‐
52              sal  Time)  unless  option  -t is used. In this latter case, the
53              timestamp is displayed in local time.
54
55       -e [ hh:mm:ss ]
56              Set the ending time of the report,  given  in  local  time.  The
57              default  ending time is 18:00:00. Hours must be given in 24-hour
58              format.  This option is ignored when option -x is used.
59
60       -h     When used in conjunction with option -d or  -D,  all  activities
61              will be displayed horizontally on a single line.
62
63       -H     Display the header of the data file.
64
65       -P { cpu [,...] | ALL }
66              Tell sadf that processor dependent statistics are to be reported
67              only for the specified processor or processors.  Specifying  the
68              ALL  keyword  reports  statistics for each individual processor,
69              and globally for all processors. Note that processor  0  is  the
70              first processor.
71
72       -p     Print  the contents of the data file in a format that can easily
73              be handled by pattern processing commands like awk.  The  output
74              consists  of fields separated by a tab. Each record contains the
75              hostname of the host where the file was  created,  the  interval
76              value  (or  -1  if  not  applicable), the timestamp (UTC value -
77              Coordinated Universal Time)  in  seconds  from  the  epoch,  the
78              device  name  (or  -  if not applicable), the field name and its
79              value.
80
81       -s [ hh:mm:ss ]
82              Set the starting time of the data (given in local time), causing
83              the  sadf  command to extract records time-tagged at, or follow‐
84              ing, the time specified. The default starting time is  08:00:00.
85              Hours  must  be  given in 24-hour format. This option is ignored
86              when option -x is used.
87
88       -t     When this option is used together with options  -d  or  -x,  the
89              timestamp is displayed in local time instead of UTC (Coordinated
90              Universal Time).  This option is ignored when options -p  or  -D
91              are used.
92
93       -V     Print version number then exit.
94
95       -x     Print  the  contents of the data file in XML format.  Timestamps
96              are displayed in UTC (Coordinated Universal Time) unless  option
97              -t  is used, in which case they are displayed in local time. The
98              corresponding DTD (Document Type Definition) and XML Schema  are
99              included  in the sysstat source package. They are also available
100              at http://pagesperso-orange.fr/sebastien.godard/download.html
101
102

ENVIRONMENT

104       The sadf command takes into account the following environment variable:
105
106
107       S_TIME_DEF_TIME
108              If this variable exists and its value is UTC then sadf will  use
109              UTC  time  instead  of local time to determine the current daily
110              data file located in the /var/log/sa directory.
111

EXAMPLES

113       sadf -d /var/log/sa/sa21 -- -r -n DEV
114              Extract memory, swap space and network  statistics  from  system
115              activity  file  'sa21', and display them in a format that can be
116              ingested by a database.
117
118       sadf -p -P 1
119              Extract CPU statistics for processor 1  (the  second  processor)
120              from  current daily data file, and display them in a format that
121              can easily be handled by a pattern processing command.
122
123

FILES

125       /var/log/sa/sadd
126              Indicate the daily data file, where the dd parameter is a number
127              representing the day of the month.
128
129

AUTHOR

131       Sebastien Godard (sysstat <at> orange.fr)
132

SEE ALSO

134       sar(1), sadc(8), sa1(8), sa2(8), isag(1)
135
136       http://pagesperso-orange.fr/sebastien.godard/
137
138
139
140Linux                            OCTOBER 2009                          SADF(1)
Impressum