Below is an example of PSAdmin Disk Space Monitoring shell script which can be customized or enhanced further on requirements!!!

You need to open a VI editor in Unix and Create a shell script as below, Schedule it if required!!!

———————————————————————————————————

# A shell script to send message as part of PSAdmin Disk Space Monitoring.

SUBJECT=”Disk Space – Servers”

EMAIL=”AnyValid@EmailAdd.com

EMAILMESSAGE=”DataBase_`date +%m%d%y`.txt”

echo “Executed Disk Space Monitor Commands for directories”>$EMAILMESSAGE

echo “——————————-Begin Report————————————————-” >>$EMAILMESSAGE

df -g /psoft* >>$EMAILMESSAGE

df -g /xfer* >>$EMAILMESSAGE

echo “——————————-End Of Report————————————————-“>>$EMAILMESSAGE

mail -s “$SUBJECT” “$EMAIL” < $EMAILMESSAGE

———————————————————————————————————

Advertisements