Browse Source

Fix for OpenBSD 6.2

758d4ba9a7 (diff-d3ca8881345ccaf84b784637f5244eac)
changes the way vmstat prints free memory
haproxy_munin
Daniel Jakots 3 years ago
parent
commit
019ce03e3a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      nagios-nrpe/files/plugins_bsd/check_free_mem.sh

+ 1
- 1
nagios-nrpe/files/plugins_bsd/check_free_mem.sh View File

@ -64,7 +64,7 @@ __EOT
# Total memory size (in MB)
tot_mem=$(( `/sbin/sysctl -n hw.physmem` / BYTES_IN_MB))
# Free memory size (in MB)
free_mem=$(( `/usr/bin/vmstat | /usr/bin/tail -1 | /usr/bin/awk '{ print $5 }'` / KB_IN_MB ))
free_mem=$(/usr/bin/vmstat | /usr/bin/tail -1 | /usr/bin/awk '{ print $4 }' | tr -d 'M')
# Free memory size (in percentage)
free_mem_perc=$(( free_mem * 100 / tot_mem ))


Loading…
Cancel
Save