Skip to content

Commit 660f8cf

Browse files
committed
Make JSON output consistent with XML one
Use only header "cpu-load" for both "sar -u" and "sar -u ALL" statistics (header "cpu-load-all" is removed). This is what is done in XML output. So do the same here for JSON output. Signed-off-by: Sebastien GODARD <[email protected]>
1 parent e2e48d2 commit 660f8cf

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

json_stats.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,7 @@ __print_funct_t json_print_cpu_stats(struct activity *a, int curr, int tab,
115115
struct stats_cpu *scc, *scp;
116116
char cpuno[8];
117117

118-
if (DISPLAY_CPU_DEF(a->opt_flags)) {
119-
xprintf(tab++, "\"cpu-load\": [");
120-
}
121-
else if (DISPLAY_CPU_ALL(a->opt_flags)) {
122-
xprintf(tab++, "\"cpu-load-all\": [");
123-
}
118+
xprintf(tab++, "\"cpu-load\": [");
124119

125120
for (i = 0; (i < a->nr) && (i < a->bitmap->b_size + 1); i++) {
126121

0 commit comments

Comments
 (0)