Xymon Mailing List Archive search

update to AIX client script

1 message in this thread

list Stef Coene · Thu, 23 Oct 2014 21:59 +0200 ·
Hi,

In the older version of the AIX client script, the df command was modified so it uses the filtered output of the mount command to only include local filesystems.  This is removed in the newer client.

This is the modified script (sorry for the line breaks, but the mount command is the modified part of the script):

echo "[df]"
# The sed stuff is to make sure lines are not split into two.
df -Ik `mount | awk '$3~/jfs/ {printf $2 " "}'` | sed -e '/^[^   ][^   ]*$/{
N
s/[   ]*\n[    ]*/ /
}'

echo "[inode]"
/usr/sysv/bin/df -i `mount | awk '$3~/jfs/ {printf $2 " "}'` | sed -e 's!Mount Dir!Mount_Dir!' | awk '
NR<2 { printf "%-20s %10s %10s %10s %10s %s\n", $2, $5, $3, $4, $6, "Mounted on" }
NR>=2 && $5>0 { printf "%-20s %10d %10d %10d %10s %s\n", $2, $5, $3, $4, $6, $1}
'