A segunda coluna ( 3
) mostra o intervalo de medição em segundos.
% 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
e esta é a 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
de 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.