BIG

shell script storage usage monitoring email sending

 

 shell> vi ./monitor_df.sh
 
 #!/bin/bash
 df -h > /home/util/df_result.txt
 TO_EMAIL="test@test.com"
 SUBJECT="TEST SERVER  HDD df result"
 /bin/mail -r "test@test.com" -s "$SUBJECT" "$TO_EMAIL" < /home/util/df_result.txt
 
 shell> chmod 701 ./monitor_df.sh
LIST