How to pass the -r flag with check_load plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sudhanshu
Posts: 1
Joined: Thu May 25, 2017 6:35 am

How to pass the -r flag with check_load plugin

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

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

Post 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)
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

Agreed, based on the output, I would guess you have about 4 CPUs
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked