Hi,
I've been asked to find out how the command check_xi_nagiosxiserver using --mode=iowait calculates I/O wait and is this any different from how I/O wait is calculated by using check_nrpe with check_cpu_stats?
I/O Wait Checks
Re: I/O Wait Checks
check_xi_nagiosxiserver ultimately queries the recorded value in the database (xi_systat table).
IO Wait is collected on a delay and stored in a single record in the database that gets overwritten. How this is collected can be seen in /usr/local/nagiosxi/cron/sysstat.php around line 232:
This is then split into component parts, serialized and stored in the database.
check_nrpe with check_cpu_stats calls the script at /usr/local/nagios/libexec/check_cpu_stats.sh
This collects IO Wait data around line 118:
Since NRPE isn't dependent on a database, the method of retrieval is necessarily different.
IO Wait is collected on a delay and stored in a single record in the database that gets overwritten. How this is collected can be seen in /usr/local/nagiosxi/cron/sysstat.php around line 232:
Code: Select all
/usr/bin/iostat -c 5 2 | grep -v '^ *$' | tail -1 | awk '{ print $1,$2,$3,$4,$5,$6 }'
check_nrpe with check_cpu_stats calls the script at /usr/local/nagios/libexec/check_cpu_stats.sh
This collects IO Wait data around line 118:
Code: Select all
Linux ) CPU_REPORT=`iostat -c 5 2 | tr -s ' ' ';' | sed '/^$/d' | tail -1`
CPU_USER=`echo $CPU_REPORT | cut -d ";" -f 2`
CPU_SYSTEM=`echo $CPU_REPORT | cut -d ";" -f 4`
CPU_IOWAIT=`echo $CPU_REPORT | cut -d ";" -f 5`
CPU_IDLE=`echo $CPU_REPORT | cut -d ";" -f 7`
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.