]> granicus.if.org Git - sysstat/commit
sar/sadc: Don't assume CPU statistics are always recorded in file
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 17 Nov 2017 08:33:50 +0000 (09:33 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 17 Nov 2017 08:33:50 +0000 (09:33 +0100)
commitba939dc584d3e5540a23ec3750a249008039f52b
tree432d8a4b540c565b4e7b5d36fe1e153cf4b6c198
parent5d65582f4cbff0448c081958a6f808a6188f64c4
sar/sadc: Don't assume CPU statistics are always recorded in file

CPU statistics were always collected and saved when a saDD datafile was
created. Those statistics were in particular used to compute time
interval in jiffies, and to give the number of processors of the machine
(which was displayed in the report header).

We no longer use CPU jiffies to compute time interval (which is now
expressed in 1/100th of a second and calculated using the /proc/uptime
file). So CPU statistics are no longer compulsory: They may not be
collected and available in file.
Since we always need a way to know the number of CPU of the machine
where the data file has been created, we add a new field (sa_cpu_nr) in
the file_header structure.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sa.h
sa_common.c
sadc.c
sadf.c
sadf.h
sadf_misc.c
sar.c