2

When you use sadf to make a report from sysstat's datafile, the following lines will be shown:

ncm     3       2015-05-11 03:57:15 UTC all     %%user  0.08
ncm     3       2015-05-11 03:57:15 UTC all     %%nice  0.00
ncm     3       2015-05-11 03:57:15 UTC all     %%system        0.08
ncm     3       2015-05-11 03:57:15 UTC all     %%iowait        0.00
ncm     3       2015-05-11 03:57:15 UTC all     %%steal 0.00
ncm     3       2015-05-11 03:57:15 UTC all     %%idle  99.84

What does the second filed of this output mean?

SuB
  • 4,229
  • 5
  • 24
  • 33

1 Answers1

4

The 2nd column (3) shows the measurement interval in seconds.

% sar -u -o datafile 3 2
Linux 3.19.0-16-generic (mysecret)  11.05.2015  _x86_64_    (2 CPU)

12:01:20        CPU     %user     %nice   %system   %iowait    %steal     %idle
12:01:23        all      0,68      0,00      0,34      1,01      0,00     97,97
12:01:26        all      4,57      0,00      2,20      0,00      0,00     93,23
Average:        all      2,62      0,00      1,27      0,51      0,00     95,60

and this is the sadf output:

% sadf datafile         
mysecret    3   2015-05-11 10:01:23 UTC all %%user  0,68
mysecret    3   2015-05-11 10:01:23 UTC all %%nice  0,00
mysecret    3   2015-05-11 10:01:23 UTC all %%system    0,34
mysecret    3   2015-05-11 10:01:23 UTC all %%iowait    1,01
mysecret    3   2015-05-11 10:01:23 UTC all %%steal 0,00
mysecret    3   2015-05-11 10:01:23 UTC all %%idle  97,97
mysecret    3   2015-05-11 10:01:26 UTC all %%user  4,57
mysecret    3   2015-05-11 10:01:26 UTC all %%nice  0,00
mysecret    3   2015-05-11 10:01:26 UTC all %%system    2,20
mysecret    3   2015-05-11 10:01:26 UTC all %%iowait    0,00
mysecret    3   2015-05-11 10:01:26 UTC all %%steal 0,00
mysecret    3   2015-05-11 10:01:26 UTC all %%idle  93,23

from man sar:

sar -o datafile interval count

    All data are captured in binary form and saved to a file (datafile).
    The data can then be selectively displayed with the sar command using the -f option. Set the interval and count parameters to select count records at interval  second  intervals.
    If  the  count  parameter is not set, all the records saved in the file will be selected.
    Collection of data in this manner is useful to characterize system usage over a period of time and determine peak usage hours.
A.B.
  • 90,397