Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
@konstantin
Favorites0
Views
Projects0
/usr/bin/iostat -d /dev/sda -t 58 2 | awk 'NR==9{print $2}' > /var/lib/nagios/iostat/tps.tmp && mv /var/lib/nagios/iostat/tps.tmp /var/lib/nagios/iostat/tps ich have changed the cronjob like this using one awk to get the right value. And I also used other log locations due to linux FHS. May be this is better... or not... just wanted to post ;-)
Reviewed 13 years ago
Hi, I want to add 2 Hints. The Expression from comma to point is not needed. Just export LANG=C in the script. Then the output of iostat will be dotted. The second is that I would suggest to use #!/bin/bash as interpreter due to the fact that /bin/sh is linked to /bin/dash in newer distributions. And this script will not work without it.