fprintf(stderr, _("Options are:\n"
"[ -A ] [ -n ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ]\n"
- "[ -N { <node_list> | ALL } ] [ -o JSON ] [ -P { <cpu_list> | ON | ALL } ]\n"));
+ "[ -N { <node_list> | ALL } ] [ -o JSON ] [ -P { <cpu_list> | ALL } ]\n"));
exit(1);
}
scc->cpu_hardirq + scc->cpu_softirq) == 0) {
/* This is an offline CPU */
-
- if (!DISPLAY_ONLINE_CPU(flags)) {
- /*
- * Display offline CPU if requested by the user.
- * Value displayed is 0.00.
- */
- printf("%-11s", curr_string);
- cprintf_in(IS_INT, " %4d", "", cpu - 1);
- cprintf_f(NO_UNIT, 1, 9, 2, 0.0);
- printf("\n");
- }
continue;
}
scc->cpu_hardirq + scc->cpu_softirq) == 0) {
/* This is an offline CPU */
-
- if (!DISPLAY_ONLINE_CPU(flags)) {
- /*
- * Display offline CPU if requested by the user.
- * Value displayed is 0.00.
- */
- xprintf0(tab, "{\"cpu\": \"%d\", \"intr\": 0.00}",
- cpu - 1);
- }
continue;
}
if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys +
scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal +
- scc->cpu_hardirq + scc->cpu_softirq) == 0) {
-
+ scc->cpu_hardirq + scc->cpu_softirq) == 0)
/* Offline CPU found */
-
- if (DISPLAY_ONLINE_CPU(flags))
- continue;
- }
+ continue;
printf("%-11s", curr_string);
cprintf_in(IS_INT, " %3d", "", cpu - 1);
if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys +
scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal +
- scc->cpu_hardirq + scc->cpu_softirq) == 0) {
-
+ scc->cpu_hardirq + scc->cpu_softirq) == 0)
/* Offline CPU found */
-
- if (DISPLAY_ONLINE_CPU(flags))
- continue;
- }
+ continue;
if (nextcpu) {
printf(",\n");
flags |= F_P_OPTION;
dis_hdr = 9;
- if (!strcmp(argv[opt], K_ON)) {
- /* Display stats for all online CPU */
- flags |= F_P_ON;
- memset(cpu_bitmap, ~0, BITMAP_SIZE(cpu_nr));
- }
- else if (parse_values(argv[opt], cpu_bitmap, cpu_nr, K_LOWERALL)) {
+ if (parse_values(argv[opt], cpu_bitmap, cpu_nr, K_LOWERALL)) {
usage(argv[0]);
}
}
/* Indicate that option -P has been used */
#define F_P_OPTION 0x01
-/* Indicate that stats should be displayed on for online CPU ("-P ON") */
-#define F_P_ON 0x02
+/* 0x02: unused */
/* JSON output */
#define F_JSON_OUTPUT 0x04
/* Indicate that option -N has been used */
#define F_N_OPTION 0x08
#define USE_P_OPTION(m) (((m) & F_P_OPTION) == F_P_OPTION)
-#define DISPLAY_ONLINE_CPU(m) (((m) & F_P_ON) == F_P_ON)
#define DISPLAY_JSON_OUTPUT(m) (((m) & F_JSON_OUTPUT) == F_JSON_OUTPUT)
#define USE_N_OPTION(m) (((m) & F_N_OPTION) == F_N_OPTION)
#define K_SUM "SUM"
#define K_CPU "CPU"
#define K_SCPU "SCPU"
-#define K_ON "ON"
#define NR_IRQCPU_PREALLOC 3