]> granicus.if.org Git - sysstat/commit
sar: Take into account a change of CPU number in sar datafile (1)
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 26 Jan 2014 16:28:15 +0000 (17:28 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 26 Jan 2014 16:28:15 +0000 (17:28 +0100)
commit8a2b558892353ff1fdcc70be187106837aeea882
tree4bfb10ac6916f7a20af4f9586cf2539d3b4ae7a0
parent0b97789cd6b10bca691a9bf43b7cf95cc4fdf384
sar: Take into account a change of CPU number in sar datafile (1)

On virtual machine, after CPU change (e.g. power off machine ->
add 1 cpu -> power on machine), sar command doesn't display
previous data (from today) from the current saXX file.

This is the first patch aimed at making sar able to take into account
a change of CPU count in its datafiles.

This patch adds a new field into file's header data (last_cpu_nr)
which gives the number of CPU the machine had when the last sample of
data was appended to the file.
Sar data file format is no longer compatible with that from previous
sysstat versions. To be able to add other fields to file's header
in the future without making it incompatible again, also add a
field (header_size) to file's magic data giving the size of file's
header.

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