From: Sebastien GODARD Date: Sat, 8 Feb 2014 14:35:00 +0000 (+0100) Subject: Make sadf -H display last CPU count in file X-Git-Tag: v10.3.1~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dab9aeb76159d530a894ab47efd3df19623e4e36;p=sysstat Make sadf -H display last CPU count in file sadf -H now displays the last CPU count recorded in the data file. This is the value of the last_cpu_nr field saved in file's header, giving the number of processors the machine had when the last sample of statistics was appended to the file. Signed-off-by: Sebastien GODARD --- diff --git a/sadf_misc.c b/sadf_misc.c index c0446b3..9fb2a8a 100644 --- a/sadf_misc.c +++ b/sadf_misc.c @@ -633,6 +633,9 @@ __printf_funct_t print_hdr_header(int *tab, int action, char *dfile, file_hdr->sa_nodename, file_hdr->sa_machine, cpu_nr > 1 ? cpu_nr - 1 : 1); + printf(_("Number of CPU for last samples in file: %u\n"), + file_hdr->last_cpu_nr > 1 ? file_hdr->last_cpu_nr - 1 : 1); + if ((loc_t = gmtime((const time_t *) &file_hdr->sa_ust_time)) != NULL) { printf(_("File time: ")); strftime(cur_time, sizeof(cur_time), "%T", loc_t);