need help for scrip to monitor disk utilization

Hi,

I need help to write a script which will monitor disk utilization.

Please suggest the best approach to achive this.

I am thinking of having sleep inside the script which will run for(eg.) 60 secs and then disk utilization will be checked and depends on the % usage of disk mail will be triggerd if required.
But using sleep is some thing like always cosuming some amount of memory and CPU, Please suggest if there could be any way like any internal OS process or flag could be used which automatically sends trigger message to run the script, Just looking for best approach to save resources.

Regards
Sunny

Hey Sunny,

I hope sleep will not use much memory & CPU. If you would prefer not to use sleep then I would suggest you to schedule the script as a cron job.

I am not sure why you would need disk utilization script to run every 1 minute(Unless your system has several huge files dumped at the same time). I would suggest you to run this script once in a day.

-Nithin.