Calculating the Time left till Filesystem is full
Hallo all,
I face the problem having a filesystem (containing oracle redologs) which sometime grow too fast to 100%.
I need a script which calculates the available Space and compares this with the last Minutes or hours of growing and extrapolite the time to reach 100%. If the time is lower than a threshold (maybe 12 hours ) send a email alert to root.
Can anyone help me with that general problem or give me first a hint to calculate a timedifference out of two date- values with bash-shell resources?
please help me
[549 byte] By [
Trabuthan] at [2007-11-26 7:18:55]

# 2
I am sure there are many ways this can be done. I write shell scripts that keep me posted to my disk space and email my blackberry before the volumes are full.
For the most part my simple scripts does a "df -k" every hour and looks at the percent used value when it hits 90% it starts paging. I don't see why you could not store the last tested value and compare them. Since you know the time at which the cron job runs you have a good understanding of growth in the volume. And since the volume is a fixed size you can set a threshold of if it grows X% in an hour email me.
Someone that is good with perl could write this in 10 minutes. Shell script will take someone 15.