Results 1 to 4 of 4
Iam doing a project in Free BSD and i am stuck with a puzzle. Please any one of you clarify my doubt :
How to add a mechanism to check ...
- 02-08-2006 #1Just Joined!
- Join Date
- Feb 2006
- Posts
- 4
help me in modifying the resource configuration file in Free BSD
Iam doing a project in Free BSD and i am stuck with a puzzle. Please any one of you clarify my doubt :
How to add a mechanism to check the status of the file system which alerts the root user via. email if any single partition is greater than 90% full. The alert should include the file system directory name and the partition?
- 02-13-2006 #2Linux Enthusiast
- Join Date
- Feb 2005
- Location
- Luton, England, UK, Earth
- Posts
- 639
I'm not sure but it really does seem as if you are trying to get us to do your homework for you...
- 02-14-2006 #3Just Joined!
- Join Date
- Feb 2006
- Posts
- 4
Hey i didnt really mean that. Its just the part of my project work on Free BSD.
- 03-03-2006 #4Linux Engineer
- Join Date
- Mar 2005
- Posts
- 1,431
I'm not an awk wizard, so I used the awk part from the former thread of yours:
I haven't tested it on freebsd, but you can. Replace "echo filled up" with some command to mail root. "sleep 86400" edits how long it takes (in seconds) before it re-checks how filled up the filesystems are, in the script it's set to 86400 seconds = 24 hours.Code:#!/bin/sh while `true`; do if [ `df |sed '1d'|awk '{if ($5 > 90) print $5,$6}'|wc -l` > 0 ]; then echo filled up fi sleep 86400 done


Reply With Quote
