* Number of CPU items (1 .. CPU_NR + 1) for the last sample in file.
*/
unsigned int sa_last_cpu_nr __attribute__ ((aligned (8)));
+ /*
+ * Number of [online or offline] CPU (1 .. CPU_NR + 1)
+ * when the datafile has been created.
+ * When reading a datafile, this value is updated whenever
+ * a RESTART record is found.
+ */
+ unsigned int sa_cpu_nr;
/*
* Number of activities saved in file.
*/
#define FILE_HEADER_SIZE (sizeof(struct file_header))
#define FILE_HEADER_ULL_NR 1 /* Nr of unsigned long long in file_header structure */
#define FILE_HEADER_UL_NR 1 /* Nr of unsigned long in file_header structure */
-#define FILE_HEADER_U_NR 12 /* Nr of [unsigned] int in file_header structure */
+#define FILE_HEADER_U_NR 13 /* Nr of [unsigned] int in file_header structure */
/* The values below are used for sanity check */
#define MIN_FILE_HEADER_SIZE 0
#define MAX_FILE_HEADER_SIZE 8192
* (data displayed once at the beginning of the report).
*/
__printf_funct_t (*f_header) (void *, int, char *, struct file_magic *, struct file_header *,
- __nr_t, struct activity * [], unsigned int []);
+ struct activity * [], unsigned int []);
/*
* This function defines the statistics part of the report.
* Used only with textual (XML-like) reports.
/*
* This function displays the restart messages.
*/
- __printf_funct_t (*f_restart) (int *, int, char *, char *, int, struct file_header *,
- unsigned int);
+ __printf_funct_t (*f_restart) (int *, int, char *, char *, int, struct file_header *);
/*
* This function displays the comments.
*/
int parse_timestamp
(char * [], int *, struct tstamp *, const char *);
void print_report_hdr
- (unsigned int, struct tm *, struct file_header *, int);
+ (unsigned int, struct tm *, struct file_header *);
void print_sar_comment
(int *, int, char *, char *, int, char *, struct file_header *);
-void print_sar_restart
- (int *, int, char *, char *, int, struct file_header *, unsigned int);
+__printf_funct_t print_sar_restart
+ (int *, int, char *, char *, int, struct file_header *);
int print_special_record
(struct record_header *, unsigned int, struct tstamp *, struct tstamp *,
int, int, struct tm *, struct tm *, char *, int, struct file_magic *,
* IN:
* @flags Flags for common options and system state.
* @file_hdr System activity file standard header.
- * @cpu_nr Number of CPU (value in [1, NR_CPUS + 1]).
- * 1 means that there is only one proc and non SMP kernel.
- * 2 means one proc and SMP kernel.
- * Etc.
*
* OUT:
* @rectime Date and time from file header.
***************************************************************************
*/
void print_report_hdr(unsigned int flags, struct tm *rectime,
- struct file_header *file_hdr, int cpu_nr)
+ struct file_header *file_hdr)
{
/* Get date of file creation */
get_file_timestamp_struct(flags, rectime, file_hdr);
- /* Display the header */
+ /*
+ * Display the header.
+ * NB: Number of CPU (value in [1, NR_CPUS + 1]).
+ * 1 means that there is only one proc and non SMP kernel.
+ * 2 means one proc and SMP kernel. Etc.
+ */
print_gal_header(rectime, file_hdr->sa_sysname, file_hdr->sa_release,
file_hdr->sa_nodename, file_hdr->sa_machine,
- cpu_nr > 1 ? cpu_nr - 1 : 1,
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1,
PLAIN_OUTPUT);
}
/* Default is CPU activity... */
if (!get_activity_nr(act, AO_SELECTED, COUNT_ACTIVITIES)) {
/*
- * Still OK even when reading stats from a file
- * since A_CPU activity is always recorded.
+ * Yet A_CPU activity may not be available in file
+ * since the user can choose not to collect it.
*/
act[p]->options |= AO_SELECTED;
}
int ignore, int *endian_mismatch, int *arch_64)
{
int i, j, k, p;
- unsigned int a_cpu = FALSE;
struct file_activity *fal;
void *buffer = NULL;
act[p]->ftypes_nr[k] = fal->types_nr[k];
}
- if (fal->id == A_CPU) {
- a_cpu = TRUE;
- }
-
if (fal->size > act[p]->msize) {
act[p]->msize = fal->size;
}
id_seq[j++] = fal->id;
}
- if (!a_cpu)
- /*
- * CPU activity should always be in file
- * and have a known format (expected magical number).
- */
- goto format_error;
-
while (j < NR_ACT) {
id_seq[j++] = 0;
}
{
char cur_date[TIMESTAMP_LEN], cur_time[TIMESTAMP_LEN];
int dp = 1;
- unsigned int new_cpu_nr;
/* Fill timestamp structure (rectime) for current record */
if (sa_get_record_timestamp_struct(l_flags, record_hdr, rectime, loctime))
}
if (rtype == R_RESTART) {
- /* Don't forget to read the volatile activities structures */
- new_cpu_nr = read_vol_act_structures(ifd, act, file, file_magic,
- file_hdr->sa_vol_act_nr,
- endian_mismatch, arch_64);
+ /* Read new cpu number following RESTART record */
+ file_hdr->sa_cpu_nr = read_vol_act_structures(ifd, act, file, file_magic,
+ file_hdr->sa_vol_act_nr,
+ endian_mismatch, arch_64);
if (!dp)
return 0;
if (*ofmt->f_restart) {
(*ofmt->f_restart)(&tab, F_MAIN, cur_date, cur_time,
!PRINT_LOCAL_TIME(l_flags) &&
- !PRINT_TRUE_TIME(l_flags), file_hdr,
- new_cpu_nr);
+ !PRINT_TRUE_TIME(l_flags), file_hdr);
}
}
else if (rtype == R_COMMENT) {
/*
* Although undocumented, option -S followed by a numerical value
* enables the user to select each activity that should be
- * collected. "-S 0" unselects all activities but CPU.
+ * collected. "-S 0" unselects all activities.
* A value greater than 255 enables the user to select groups
* of activities.
*/
usage(argv[0]);
}
else if (!act_id) {
- /* Unselect all activities but CPU */
+ /* Unselect all activities */
for (i = 0; i < NR_ACT; i++) {
act[i]->options &= ~AO_COLLECTED;
}
- COLLECT_ACTIVITY(A_CPU);
}
else {
/* Select chosen activity */
* always counted (in sa_sys_init()).
*/
file_hdr.sa_last_cpu_nr = act[get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND)]->nr;
+ /*
+ * This is a new file (or stdout): Set sa_cpu_nr field to the number
+ * of CPU of the machine (1 .. CPU_NR + 1). This is the number of CPU, whether
+ * online or offline, at the time of the first collected sample.
+ * All activities (including A_CPU) are counted in sa_sys_init(), even
+ * if they are not collected.
+ */
+ file_hdr.sa_cpu_nr = act[get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND)]->nr;
/* Get system name, release number, hostname and machine architecture */
uname(&header);
}
p = get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND);
- if (!IS_COLLECTED(act[p]->options)) {
- /* A_CPU activity should always exist in file */
- goto append_error;
- }
+ if (!IS_COLLECTED(act[p]->options))
+ /* A_CPU activity may not exist in file */
+ return;
if (act[p]->nr != file_hdr.sa_last_cpu_nr) {
if (restart_mark) {
}
}
+ /* At least one activity must be collected (default is A_CPU) */
+ if (!get_activity_nr(act, AO_COLLECTED, COUNT_ACTIVITIES)) {
+ COLLECT_ACTIVITY(A_CPU);
+ }
+
/* Process file entered on the command line */
if (WANT_SA_ROTAT(flags)) {
/* File name set to '-' */
* @file_actlst List of (known or unknown) activities in file.
* @file System activity data file name (name of file being read).
* @file_magic System activity file magic header.
- * @cpu_nr Number of processors for current activity data file.
* @rectime Structure where timestamp (expressed in local time or in UTC
* depending on whether options -T/-t have been used or not) can
* be saved for current record.
***************************************************************************
*/
void logic1_display_loop(int ifd, struct file_activity *file_actlst, char *file,
- struct file_magic *file_magic, __nr_t cpu_nr,
+ struct file_magic *file_magic,
struct tm *rectime, struct tm *loctime)
{
int curr, tab = 0, rtype;
/* Print header (eg. XML file header) */
if (*fmt[f_position]->f_header) {
(*fmt[f_position]->f_header)(&tab, F_BEGIN, file, file_magic,
- &file_hdr, cpu_nr, act, id_seq);
+ &file_hdr, act, id_seq);
}
/* Process activities */
/* Process now RESTART entries to display restart messages */
if (*fmt[f_position]->f_restart) {
(*fmt[f_position]->f_restart)(&tab, F_BEGIN, NULL, NULL, FALSE,
- &file_hdr, 0);
+ &file_hdr);
}
do {
while (!eosaf);
if (*fmt[f_position]->f_restart) {
- (*fmt[f_position]->f_restart)(&tab, F_END, NULL, NULL, FALSE, &file_hdr, 0);
+ (*fmt[f_position]->f_restart)(&tab, F_END, NULL, NULL, FALSE, &file_hdr);
}
/* Rewind file... */
/* Print header trailer */
if (*fmt[f_position]->f_header) {
(*fmt[f_position]->f_header)(&tab, F_END, file, file_magic,
- &file_hdr, cpu_nr, act, id_seq);
+ &file_hdr, act, id_seq);
}
}
* IN:
* @ifd File descriptor of input file.
* @file_actlst List of (known or unknown) activities in file.
- * @cpu_nr Number of processors for current activity data file.
* @rectime Structure where timestamp (expressed in local time or in UTC
* depending on whether options -T/-t have been used or not) can
* be saved for current record.
* @file_magic file_magic structure filled with file magic header data.
***************************************************************************
*/
-void logic3_display_loop(int ifd, struct file_activity *file_actlst, __nr_t cpu_nr,
+void logic3_display_loop(int ifd, struct file_activity *file_actlst,
struct tm *rectime, struct tm *loctime, char *file,
struct file_magic *file_magic)
{
/* Print SVG header */
if (*fmt[f_position]->f_header) {
(*fmt[f_position]->f_header)(&parm, F_BEGIN + F_MAIN, file, file_magic,
- &file_hdr, cpu_nr, act, id_seq);
+ &file_hdr, act, id_seq);
}
/*
/* Print SVG trailer */
if (*fmt[f_position]->f_header) {
(*fmt[f_position]->f_header)(&parm, F_END, file, file_magic,
- &file_hdr, cpu_nr, act, id_seq);
+ &file_hdr, act, id_seq);
}
}
struct file_activity *file_actlst = NULL;
struct tm rectime, loctime;
int ifd, ignore, tab = 0;
- __nr_t cpu_nr;
/* Prepare file for reading and read its headers */
ignore = ACCEPT_BAD_FILE_FORMAT(fmt[f_position]->options);
check_file_actlst(&ifd, dfile, act, &file_magic, &file_hdr,
&file_actlst, id_seq, ignore, &endian_mismatch, &arch_64);
- /* Now pick up number of proc for this file */
- cpu_nr = act[get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND)]->nr;
-
if (DISPLAY_HDR_ONLY(flags)) {
if (*fmt[f_position]->f_header) {
/* Display only data file header then exit */
(*fmt[f_position]->f_header)(&tab, F_BEGIN + F_END, dfile, &file_magic,
- &file_hdr, cpu_nr, act, id_seq);
+ &file_hdr, act, id_seq);
}
exit(0);
}
/* Call function corresponding to selected output format */
if (format == F_SVG_OUTPUT) {
- logic3_display_loop(ifd, file_actlst, cpu_nr,
+ logic3_display_loop(ifd, file_actlst,
&rectime, &loctime, dfile, &file_magic);
}
else if (DISPLAY_GROUPED_STATS(fmt[f_position]->options)) {
}
else {
logic1_display_loop(ifd, file_actlst, dfile,
- &file_magic, cpu_nr, &rectime, &loctime);
+ &file_magic, &rectime, &loctime);
}
close(ifd);
* Prototypes used to display restart messages
*/
__printf_funct_t print_db_restart
- (int *, int, char *, char *, int, struct file_header *, unsigned int);
+ (int *, int, char *, char *, int, struct file_header *);
__printf_funct_t print_ppc_restart
- (int *, int, char *, char *, int, struct file_header *, unsigned int);
+ (int *, int, char *, char *, int, struct file_header *);
__printf_funct_t print_xml_restart
- (int *, int, char *, char *, int, struct file_header *, unsigned int);
+ (int *, int, char *, char *, int, struct file_header *);
__printf_funct_t print_json_restart
- (int *, int, char *, char *, int, struct file_header *, unsigned int);
-__printf_funct_t print_sar_restart
- (int *, int, char *, char *, int, struct file_header *, unsigned int);
+ (int *, int, char *, char *, int, struct file_header *);
__printf_funct_t print_raw_restart
- (int *, int, char *, char *, int, struct file_header *, unsigned int);
+ (int *, int, char *, char *, int, struct file_header *);
/*
* Prototypes used to display comments
*/
__printf_funct_t print_xml_header
(void *, int, char *, struct file_magic *, struct file_header *,
- __nr_t, struct activity * [], unsigned int []);
+ struct activity * [], unsigned int []);
__printf_funct_t print_json_header
(void *, int, char *, struct file_magic *, struct file_header *,
- __nr_t, struct activity * [], unsigned int []);
+ struct activity * [], unsigned int []);
__printf_funct_t print_hdr_header
(void *, int, char *, struct file_magic *, struct file_header *,
- __nr_t, struct activity * [], unsigned int []);
+ struct activity * [], unsigned int []);
__printf_funct_t print_svg_header
(void *, int, char *, struct file_magic *, struct file_header *,
- __nr_t, struct activity * [], unsigned int []);
+ struct activity * [], unsigned int []);
#endif /* _SADF_H */
* @utc True if @cur_time is expressed in UTC.
* @sep Character used as separator.
* @file_hdr System activity file standard header.
- * @cpu_nr CPU count associated with restart mark.
***************************************************************************
*/
void print_dbppc_restart(char *cur_date, char *cur_time, int utc, char sep,
- struct file_header *file_hdr, unsigned int cpu_nr)
+ struct file_header *file_hdr)
{
printf("%s%c-1%c", file_hdr->sa_nodename, sep, sep);
if (strlen(cur_date)) {
printf(" UTC");
}
printf("%cLINUX-RESTART\t(%d CPU)\n",
- sep, cpu_nr > 1 ? cpu_nr - 1 : 1);
+ sep, file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1);
}
/*
* @cur_time Time string of current restart message.
* @utc True if @cur_time is expressed in UTC.
* @file_hdr System activity file standard header.
- * @cpu_nr CPU count associated with restart mark.
***************************************************************************
*/
__printf_funct_t print_db_restart(int *tab, int action, char *cur_date,
- char *cur_time, int utc, struct file_header *file_hdr,
- unsigned int cpu_nr)
+ char *cur_time, int utc, struct file_header *file_hdr)
{
/* Actions F_BEGIN and F_END ignored */
if (action == F_MAIN) {
- print_dbppc_restart(cur_date, cur_time, utc, ';', file_hdr, cpu_nr);
+ print_dbppc_restart(cur_date, cur_time, utc, ';', file_hdr);
}
}
* @cur_time Time string of current restart message.
* @utc True if @cur_time is expressed in UTC.
* @file_hdr System activity file standard header.
- * @cpu_nr CPU count associated with restart mark.
***************************************************************************
*/
__printf_funct_t print_ppc_restart(int *tab, int action, char *cur_date,
- char *cur_time, int utc, struct file_header *file_hdr,
- unsigned int cpu_nr)
+ char *cur_time, int utc, struct file_header *file_hdr)
{
/* Actions F_BEGIN and F_END ignored */
if (action == F_MAIN) {
- print_dbppc_restart(cur_date, cur_time, utc, '\t', file_hdr, cpu_nr);
+ print_dbppc_restart(cur_date, cur_time, utc, '\t', file_hdr);
}
}
* @cur_time Time string of current restart message.
* @utc True if @cur_time is expressed in UTC.
* @file_hdr System activity file standard header (unused here).
- * @cpu_nr CPU count associated with restart mark.
*
* OUT:
* @tab Number of tabulations.
***************************************************************************
*/
__printf_funct_t print_xml_restart(int *tab, int action, char *cur_date,
- char *cur_time, int utc, struct file_header *file_hdr,
- unsigned int cpu_nr)
+ char *cur_time, int utc, struct file_header *file_hdr)
{
if (action & F_BEGIN) {
xprintf((*tab)++, "<restarts>");
}
if (action & F_MAIN) {
xprintf(*tab, "<boot date=\"%s\" time=\"%s\" utc=\"%d\" cpu_count=\"%d\"/>",
- cur_date, cur_time, utc ? 1 : 0, cpu_nr > 1 ? cpu_nr - 1 : 1);
+ cur_date, cur_time, utc ? 1 : 0,
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1);
}
if (action & F_END) {
xprintf(--(*tab), "</restarts>");
* @cur_time Time string of current restart message.
* @utc True if @cur_time is expressed in UTC.
* @file_hdr System activity file standard header (unused here).
- * @cpu_nr CPU count associated with restart mark.
*
* OUT:
* @tab Number of tabulations.
***************************************************************************
*/
__printf_funct_t print_json_restart(int *tab, int action, char *cur_date,
- char *cur_time, int utc, struct file_header *file_hdr,
- unsigned int cpu_nr)
+ char *cur_time, int utc, struct file_header *file_hdr)
{
static int sep = FALSE;
}
xprintf((*tab)++, "{");
xprintf(*tab, "\"boot\": {\"date\": \"%s\", \"time\": \"%s\", \"utc\": %d, \"cpu_count\": %d}",
- cur_date, cur_time, utc ? 1 : 0, cpu_nr > 1 ? cpu_nr - 1 : 1);
+ cur_date, cur_time, utc ? 1 : 0,
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1);
xprintf0(--(*tab), "}");
sep = TRUE;
}
* @cur_time Time string of current restart message.
* @utc True if @cur_time is expressed in UTC.
* @file_hdr System activity file standard header (unused here).
- * @cpu_nr CPU count associated with restart mark.
***************************************************************************
*/
__printf_funct_t print_raw_restart(int *tab, int action, char *cur_date,
- char *cur_time, int utc, struct file_header *file_hdr,
- unsigned int cpu_nr)
+ char *cur_time, int utc, struct file_header *file_hdr)
{
/* Actions F_BEGIN and F_END ignored */
if (action == F_MAIN) {
if (strlen(cur_date) && utc) {
printf(" UTC");
}
- printf("\tLINUX-RESTART\t(%d CPU)\n", cpu_nr > 1 ? cpu_nr - 1 : 1);
+ printf("\tLINUX-RESTART\t(%d CPU)\n",
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1);
}
}
* @dfile Name of system activity data file.
* @file_magic System activity file magic header.
* @file_hdr System activity file standard header.
- * @cpu_nr Number of processors for current daily data file.
* @act Array of activities (unused here).
* @id_seq Activity sequence (unused here).
*
*/
__printf_funct_t print_xml_header(void *parm, int action, char *dfile,
struct file_magic *file_magic,
- struct file_header *file_hdr, __nr_t cpu_nr,
+ struct file_header *file_hdr,
struct activity *act[], unsigned int id_seq[])
{
struct tm rectime, *loc_t;
xprintf(*tab, "<machine>%s</machine>", file_hdr->sa_machine);
xprintf(*tab, "<number-of-cpus>%d</number-of-cpus>",
- cpu_nr > 1 ? cpu_nr - 1 : 1);
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1);
/* Fill file timestmap structure (rectime) */
get_file_timestamp_struct(flags, &rectime, file_hdr);
* @dfile Name of system activity data file.
* @file_magic System activity file magic header.
* @file_hdr System activity file standard header.
- * @cpu_nr Number of processors for current daily data file.
* @act Array of activities (unused here).
* @id_seq Activity sequence (unused here).
*
*/
__printf_funct_t print_json_header(void *parm, int action, char *dfile,
struct file_magic *file_magic,
- struct file_header *file_hdr, __nr_t cpu_nr,
+ struct file_header *file_hdr,
struct activity *act[], unsigned int id_seq[])
{
struct tm rectime, *loc_t;
xprintf(*tab, "\"machine\": \"%s\",", file_hdr->sa_machine);
xprintf(*tab, "\"number-of-cpus\": %d,",
- cpu_nr > 1 ? cpu_nr - 1 : 1);
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1);
/* Fill file timestmap structure (rectime) */
get_file_timestamp_struct(flags, &rectime, file_hdr);
* @dfile Name of system activity data file.
* @file_magic System activity file magic header.
* @file_hdr System activity file standard header.
- * @cpu_nr Number of processors for current daily data file.
* @act Array of activities.
* @id_seq Activity sequence.
***************************************************************************
*/
__printf_funct_t print_hdr_header(void *parm, int action, char *dfile,
struct file_magic *file_magic,
- struct file_header *file_hdr, __nr_t cpu_nr,
+ struct file_header *file_hdr,
struct activity *act[], unsigned int id_seq[])
{
int i, p;
print_gal_header(localtime((const time_t *) &(file_hdr->sa_ust_time)),
file_hdr->sa_sysname, file_hdr->sa_release,
file_hdr->sa_nodename, file_hdr->sa_machine,
- cpu_nr > 1 ? cpu_nr - 1 : 1,
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1,
PLAIN_OUTPUT);
printf(_("Number of CPU for last samples in file: %u\n"),
* @dfile Name of system activity data file (unused here).
* @file_magic System activity file magic header (unused here).
* @file_hdr System activity file standard header.
- * @cpu_nr Number of processors for current daily data file.
* @act Array of activities (unused here).
* @id_seq Activity sequence (unused here).
***************************************************************************
*/
__printf_funct_t print_svg_header(void *parm, int action, char *dfile,
struct file_magic *file_magic,
- struct file_header *file_hdr, __nr_t cpu_nr,
+ struct file_header *file_hdr,
struct activity *act[], unsigned int id_seq[])
{
struct svg_hdr_parm *hdr_parm = (struct svg_hdr_parm *) parm;
print_gal_header(localtime((const time_t *) &(file_hdr->sa_ust_time)),
file_hdr->sa_sysname, file_hdr->sa_release,
file_hdr->sa_nodename, file_hdr->sa_machine,
- cpu_nr > 1 ? cpu_nr - 1 : 1,
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1,
PLAIN_OUTPUT);
printf("</text>\n");
}
* @cur_time Time string of current restart message.
* @utc True if @cur_time is expressed in UTC (unused here).
* @file_hdr System activity file standard header (unused here).
- * @cpu_nr CPU count associated with restart mark.
***************************************************************************
*/
-__print_funct_t print_sar_restart(int *tab, int action, char *cur_date, char *cur_time, int utc,
- struct file_header *file_hdr, unsigned int cpu_nr)
+__printf_funct_t print_sar_restart(int *tab, int action, char *cur_date, char *cur_time,
+ int utc, struct file_header *file_hdr)
{
char restart[64];
printf("\n%-11s", cur_time);
sprintf(restart, " LINUX RESTART\t(%d CPU)\n",
- cpu_nr > 1 ? cpu_nr - 1 : 1);
+ file_hdr->sa_cpu_nr > 1 ? file_hdr->sa_cpu_nr - 1 : 1);
cprintf_s(IS_RESTART, "%s", restart);
}
allocate_structures(act);
/* Print report header */
- print_report_hdr(flags, &rectime, &file_hdr,
- act[get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND)]->nr);
+ print_report_hdr(flags, &rectime, &file_hdr);
/* Read system statistics from file */
do {
allocate_structures(act);
/* Print report header */
- print_report_hdr(flags, &rectime, &file_hdr,
- act[get_activity_position(act, A_CPU, EXIT_IF_NOT_FOUND)]->nr);
+ print_report_hdr(flags, &rectime, &file_hdr);
/* Read system statistics sent by the data collector */
read_sadc_stat_bunch(0);