need to convet shell script in xml format to run in op manager

need to convet shell script in xml format to run in op manager

#!/usr/bin/ksh
#author : Jugvinder Punia
#email id : jugvsing@in.ibm.com
#Purpose : This script will add hostname in each line of "df -gt" output

#WeeklyHIRISE

HOSTNAME=`hostname`

Weekly_HIRISE=/tmp/$HOSTNAME
rm -f $Weekly_HIRISE/*HMSI*.csv

if [ ! -d $Weekly_HIRISE ]

then

        mkdir $Weekly_HIRISE

fi

df -gt > $Weekly_HIRISE/df.tmp
grep -v Filesystem $Weekly_HIRISE/df.tmp > $Weekly_HIRISE/df.tmp1
while read line
do
echo `hostname` $line >> $Weekly_HIRISE/df.`hostname`
done < $Weekly_HIRISE/df.tmp1
rm $Weekly_HIRISE/df.tmp $Weekly_HIRISE/df.tmp1

#Purpose : Convert to csv format

echo "Hostname Filesystem    GB_blocks      Used      Free %Used Mounted_on"  > $Weekly_HIRISE/`hostname`.csv
cat $Weekly_HIRISE/df.HMSI* >> $Weekly_HIRISE/`hostname`.csv
rm $Weekly_HIRISE/df.HMSI*

=======================================================================================================
below is the oupt of above script

$ ./WeeklyHIRISE_df.sh
$ ls -ltr /tmp/HMSISBPRAPP1/HMSISBPRAPP1.csv
-rw-------    1 IN06180C staff          1028 Oct 28 11:17 /tmp/HMSISBPRAPP1/HMSISBPRAPP1.csv
$ cat /tmp/HMSISBPRAPP1/HMSISBPRAPP1.csv
Hostname Filesystem    GB_blocks      Used      Free %Used Mounted_on
HMSISBPRAPP1 /dev/hd4 5.00 3.45 1.55 70% /
HMSISBPRAPP1 /dev/hd2 8.00 5.31 2.69 67% /usr
HMSISBPRAPP1 /dev/hd9var 5.00 0.54 4.46 11% /var
HMSISBPRAPP1 /dev/hd3 5.00 1.04 3.96 21% /tmp
HMSISBPRAPP1 /dev/hd1 5.00 2.76 2.24 56% /home
HMSISBPRAPP1 /dev/hd11admin 1.00 0.00 1.00 1% /admin
HMSISBPRAPP1 /proc - - - - /proc
HMSISBPRAPP1 /dev/hd10opt 5.00 0.38 4.62 8% /opt
HMSISBPRAPP1 /dev/livedump 1.00 0.00 1.00 1% /var/adm/ras/livedump
HMSISBPRAPP1 /dev/nimlv 40.00 25.81 14.19 65% /nim
HMSISBPRAPP1 /dev/oracle 50.00 11.03 38.97 23% /oracle
HMSISBPRAPP1 /dev/siebel 100.00 95.22 4.78 96% /siebel
HMSISBPRAPP1 /dev/opt2 49.00 0.01 48.99 1% /opt2
HMSISBPRAPP1 /dev/backup 100.00 4.70 95.30 5% /backup
HMSISBPRAPP1 /dev/nmonlv 2.00 0.27 1.73 14% /nmon
HMSISBPRAPP1 HMSISBDVDB:/installables 500.00 164.23 335.77 33% /installables
HMSISBPRAPP1 HMSISBDVDB:/mksysb 1800.00 510.72 1289.28 29% /mksysb
HMSISBPRAPP1 HMSISBPRDB:/siebelfs 199.50 14.82 184.68 8% /siebelfs
$

                New to ADSelfService Plus?