diff options
Diffstat (limited to 'plugins/check_load.c')
-rw-r--r-- | plugins/check_load.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/check_load.c b/plugins/check_load.c index f7e80fdb..78daa945 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c | |||
@@ -245,13 +245,15 @@ int main(int argc, char **argv) { | |||
245 | mp_subcheck top_proc_sc = mp_subcheck_init(); | 245 | mp_subcheck top_proc_sc = mp_subcheck_init(); |
246 | top_proc_sc = mp_set_subcheck_state(top_proc_sc, STATE_OK); | 246 | top_proc_sc = mp_set_subcheck_state(top_proc_sc, STATE_OK); |
247 | top_processes_result top_proc = print_top_consuming_processes(config.n_procs_to_show); | 247 | top_processes_result top_proc = print_top_consuming_processes(config.n_procs_to_show); |
248 | top_proc_sc.output = ""; | 248 | xasprintf(&top_proc_sc.output, "Top %lu CPU time consuming processes", config.n_procs_to_show); |
249 | 249 | ||
250 | if (top_proc.errorcode == OK) { | 250 | if (top_proc.errorcode == OK) { |
251 | for (int i = 0; i < config.n_procs_to_show; i++) { | 251 | for (int i = 0; i < config.n_procs_to_show; i++) { |
252 | xasprintf(&top_proc_sc.output, "%s\n%s", top_proc_sc.output, top_proc.top_processes[i]); | 252 | xasprintf(&top_proc_sc.output, "%s\n%s", top_proc_sc.output, top_proc.top_processes[i]); |
253 | } | 253 | } |
254 | } | 254 | } |
255 | |||
256 | mp_add_subcheck_to_check(&overall, top_proc_sc); | ||
255 | } | 257 | } |
256 | 258 | ||
257 | mp_exit(overall); | 259 | mp_exit(overall); |