scc = st_cpu[curr] + cpu;
+ /* Check CPU presence */
+ if (!scc->present)
+ continue;
/*
* Check if we want stats about this CPU.
* CPU must have been explicitly selected using option -P,
scc = st_cpu[curr] + cpu;
scp = st_cpu[prev] + cpu;
- /* Check CPU online */
- if (!scc->online)
+ /* Check CPU presence */
+ if (!scc->present)
continue;
/* Check if we want stats about this proc */
if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))))
scc = st_cpu[curr] + cpu;
scp = st_cpu[prev] + cpu;
+ /* Check CPU presence */
+ if (!scc->present)
+ continue;
/* Check if we want stats about this proc */
if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))))
continue;
}
for (proc_nb = 1; proc_nb < nbr; proc_nb++) {
- (st_cpu + proc_nb)->online = 0;
+ (st_cpu + proc_nb)->present = 0;
}
while (fgets(line, 8192, fp) != NULL) {
if (nbr > 1) {
/* All the fields don't necessarily exist */
memset(&sc, 0, STATS_CPU_SIZE);
- sc.online = 1;
+ sc.present = 1;
/*
* Read the number of jiffies spent in the different modes
* (user, nice, etc) for current proc.
unsigned long long cpu_softirq __attribute__ ((aligned (16)));
unsigned long long cpu_guest __attribute__ ((aligned (16)));
unsigned long long cpu_guest_nice __attribute__ ((aligned (16)));
- char online;
+ char present;
};
#define STATS_CPU_SIZE (sizeof(struct stats_cpu))