Monday, June 11, 2012

Shell script in Solaris for disk monitoring and sending an email...

Hi can some one post me a script that calculates the disk space and sends an email alert if it exceed 85% . 

I found some script online but i think it is not for Solaris. I am getting (`usep=$' unexpected) error when i run the script.

Some thing like this 

# put info to file 
df -kl > disk_space 
# mail file 
mailx -s "disk usage" [mail address] < disk_space

or doing some more automation you can start the below in 
the background as: 85 & 

the script ( cat ): 


Post a Comment

Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM