mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-21 01:45:14 -04:00
check_load: show the correct amount of procs
This commit is contained in:
parent
11e0648526
commit
8747c5ef8a
1 changed files with 2 additions and 1 deletions
|
|
@ -253,7 +253,8 @@ int main(int argc, char **argv) {
|
|||
config.n_procs_to_show);
|
||||
|
||||
if (top_proc.errorcode == OK) {
|
||||
for (unsigned long i = 0; i < config.n_procs_to_show; i++) {
|
||||
// +1 here since the string list contains the header line
|
||||
for (unsigned long i = 0; i < config.n_procs_to_show +1; i++) {
|
||||
xasprintf(&top_proc_sc.output, "%s\n%s", top_proc_sc.output,
|
||||
top_proc.top_processes[i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue