Page 1 of 1

How to pass the -r flag with check_load plugin

Posted: Tue Sep 12, 2017 8:44 am
by sudhanshu
Hi everyone,

How to pass the -r flag with check_load plugin to check for all CPU load. As per doc I ran check but its same with and without -r flag.

[root@nagiosxi libexec]# ./check_load -w 15,10,5 -c 30,25,20
OK - load average: 1.16, 1.28, 1.10|load1=1.160;15.000;30.000;0; load5=1.280;10.000;25.000;0; load15=1.100;5.000;20.000;0;
[root@nagiosxi libexec]# ./check_load [-r] -w 15,10,5 -c 30,25,20
OK - load average: 1.23, 1.29, 1.10|load1=1.230;15.000;30.000;0; load5=1.290;10.000;25.000;0; load15=1.100;5.000;20.000;0;
[root@nagiosxi libexec]# ./check_load -r -w 15,10,5 -c 30,25,20
OK - load average: 0.31, 0.32, 0.28|load1=0.307;15.000;30.000;0; load5=0.323;10.000;25.000;0; load15=0.275;5.000;20.000;0;


Kindly suggest.

Thanks,
Sidhansh

Re: How to pass the -r flag with check_load plugin

Posted: Tue Sep 12, 2017 9:47 am
by mcapra
What do you mean by "its same with and without -r flag"? They look different to me:

Code: Select all

[root@nagiosxi libexec]# ./check_load -w 15,10,5 -c 30,25,20
OK - load average: 1.16, 1.28, 1.10|load1=1.160;15.000;30.000;0; load5=1.280;10.000;25.000;0; load15=1.100;5.000;20.000;0;

[root@nagiosxi libexec]# ./check_load -r -w 15,10,5 -c 30,25,20
OK - load average: 0.31, 0.32, 0.28|load1=0.307;15.000;30.000;0; load5=0.323;10.000;25.000;0; load15=0.275;5.000;20.000;0;
Info on the -r flag:

Code: Select all

     -r, --percpu
        Divide the load averages by the number of CPUs (when possible)

Re: How to pass the -r flag with check_load plugin

Posted: Tue Sep 12, 2017 10:10 am
by scottwilkerson
Agreed, based on the output, I would guess you have about 4 CPUs