Re: disk utilixation monitoring script (133 Views)
Reply
Super Advisor
rajesh73
Posts: 431
Registered: ‎03-17-2009
Message 1 of 4 (170 Views)

disk utilixation monitoring script

i want to set the alert mail  when the /home mount point reach 85%, remaining mount point i dont needed

 

Please share the command

 


Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             99188468  72411856  21656700  77% /
/dev/sda2            304461020  66606804 222139032  24% /home
/dev/sda3            304461020  66606804 222139032  52% /data
/dev/sda4            304461020  66606804 222139032  80% /develop
/dev/sda5            304461020  66606804 222139032  85% /test
tmpfs                 16408808         0  16408808   0% /dev/shm

Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,200
Registered: ‎05-29-2000
Message 3 of 4 (148 Views)

Re: disk utilixation monitoring script

[ Edited ]

Attached is a script (adminalert.sh) that monitors not only disk space, but checks on other systems (ping), NFS mountpoints that are not working, and CPU load. Each of the monitors can be enabled of disabled in the config file. Run it once to automatically create the config file with sample settings. Edit the config file to fit your needs.  You can log alerts in a logfile, or send an email alert, or both. The script can be run every 5 minutes but it will limit the number of alerts (default is once per hour) to prevent email message storms. The email can be sent to one or more recipients (commans to separate addresses), and the From_address can be set to any valid return address to pass junkmail email filters.

Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,200
Registered: ‎05-29-2000
Message 4 of 4 (133 Views)

Re: disk utilixation monitoring script

Just a note: Be sure to edit the auto-created config file. It has a number of entries but they are only examples.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation