Disk useage

Pete Nesbitt pete at linux1.ca
Tue Jul 13 02:36:17 UTC 2004


On July 12, 2004 07:28 pm, Pete Nesbitt wrote:
> On July 12, 2004 06:52 pm, Bryan Elliott wrote:
> > I have a couple of mail servers that I would like to get a daily report
> > of the disk usage every day what could I use to accomplish this? The
> > servers are both Red Hat AS 2.1
> >
> > Thanks for your help.
>
> Hi Bryan,
> If you just want a little script to email you reports you could use 'df -h'
> (or whatever options you like). You could also grep the results and send a
> message if over a certain thresh-hold.
>
> I have a copy of an older version I used on a solaris box. It is at:
> http://www.linux1.ca you have to navigate to it (long story) by selecting
> 'Scripts" then at the top of that page select 'Sample Scripts'. It is
> called 'df-extreme.sh' (I think it will work in Linux as-is).
> --
> Pete Nesbitt, rhce


Well, that script will need some modificatins as IIRC the df output is a 
little different and it uses 'mailx' instead of 'mail', but all the heavy 
lifting is done already, just fix the file system names it looks for, the 
email recipient, mailx to mail, and double check the format of df.

Hope that helps.
-- 
Pete Nesbitt, rhce





More information about the redhat-list mailing list