3 # Gnucomo filesystems report.
5 # Create a parameter report with the usage of all file systems.
10 if test $OS = 'Linux' ; then
11 HOST=`hostname --fqdn`
12 elif test $OS = 'SunOS' ; then
18 echo "<?xml version='1.0'?>"
19 echo "<gcmt:message xmlns:gcmt='http://gnucomo.org/transport/'>"
21 echo " <gcmt:messagetype>XML</gcmt:messagetype>"
22 echo " <gcmt:hostname>$HOST</gcmt:hostname>"
23 echo " <gcmt:time>$TIME</gcmt:time>"
24 echo " </gcmt:header>"
27 echo " <gcmt:parameters gcmt:class='filesystem'>"
29 df -lPk -x devtmpfs -x tmpfs|tail --lines=+2 | while read DEVICE BLOCKS USED AVAILABLE CAPACITY MOUNTPOINT
31 echo "<gcmt:parameter name='$MOUNTPOINT'>"
32 echo " <gcmt:property name='device'>$DEVICE</gcmt:property>"
33 echo " <gcmt:property name='size'>$BLOCKS</gcmt:property>"
34 echo " <gcmt:property name='used'>$USED</gcmt:property>"
35 echo " <gcmt:property name='available'>$AVAILABLE</gcmt:property>"
36 echo "</gcmt:parameter>"
39 df -lPi -x devtmpfs -x tmpfs|tail --lines=+2 | while read DEVICE INODES IUSED IFREE CAPACITY MOUNTPOINT
41 echo "<gcmt:parameter name='$MOUNTPOINT'>"
42 echo " <gcmt:property name='device'>$DEVICE</gcmt:property>"
43 echo " <gcmt:property name='Inodes'>$INODES</gcmt:property>"
44 echo " <gcmt:property name='Iused'>$IUSED</gcmt:property>"
45 echo " <gcmt:property name='Ifree'>$IFREE</gcmt:property>"
46 echo "</gcmt:parameter>"
49 echo " </gcmt:parameters>"
51 echo "</gcmt:message>"