5 Oct
2005
5 Oct
'05
11:02 a.m.
Some sites that have 'df" filesystem listings that span multiple lines may need to consolidate each filesystem listing onto a single line. Noticed that the Hobbit rrd entries for our HPs have some "interesting" results ...
Just add the sed filter listed below to clean up the lines. Multiple lines can occur on HP-UX servers that have long volume group names, think it may also happen on some versions of Linux boxes, AIX boxes. Filter below is what is incorporated in BB.
in hobbitclient-hpux.sh file:
Before -
echo "[df]" /usr/bin/df -Pk
After -
echo "[df]" /usr/bin/df -Pk | sed -e '/^[^ ][^ ]*$/{ N s/[ ]*\n[ ]*/ / }'