Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-27-2008, 05:04 AM   #1
Registered: Jul 2008
Posts: 42

Rep: Reputation: 15
user disk quota exceed email alerts

i digged web and found

' warnquota' can be used to send warning mail once quota soft limit is exceeded .warnquota should be run as a cron job .

If i run this command once in an hour ,and user keep writing to disk ......User wont be getting an email ,until cron runs it again .....

Is there ny better tool or utility ?
Cani run warnquota once disk get fullca ?

can we invoke warnquota without cron ?
Old 08-27-2008, 03:11 PM   #2
Senior Member
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,093

Rep: Reputation: 197Reputation: 197
Originally Posted by 91change
If i run this command once in an hour ,and user keep writing to disk ......User wont be getting an email ,until cron runs it again .....
Well, yeah... I see what you're getting at, but how else would it work?

You could always run warnquota more often than once an hour, though I have no idea what the overhead is on it or how long it takes for one invocation to complete. I guess it depends to some extent on how many users you have. You could try running it once a minute and monitor the server load.

Even if you were able send out an email to the user the instant that they go over their soft limit there is no guarantee that they'll read it in time for it to be useful to them. There is always the risk that a user will exceed their soft limit and run in to trouble as a result before they get a warning. All you can do is make sure that if it happens they get sorted out as quickly and as easily as possible.

Originally Posted by 91change
can we invoke warnquota without cron ?
It's just an executable, you can invoke it however you want. But if you want to run it at regular intervals then cron is the logical way to do that.

I've done quite a lot of thinking recently about how to warn users that they have gone over their quota and how to deal with them going over and their grace time expiring and then not being able to log in. I have a script which runs when a user logs in, checks their quota and pops up a warning if they're over their soft limit, then it waits about ten minutes and calls itself again and so on whilst the user is logged in. The user's home directories are mounted from servers over which I have no control and they don't use warnquota or any equivalent so this is the only mechanism by which users get warned if they go over quota unless they manually check it. If you are interested I'll post the script and link to some information I just put on my own website about how to deal with users who are over quota with grace time expired in a useful manner.

I advise paying more attention to what you type when you post. Correct use of punctuation and capitals and removing glaring typing mistakes all help make posts easier to read.
Old 08-28-2008, 02:17 AM   #3
Registered: Jul 2008
Posts: 42

Original Poster
Rep: Reputation: 15
thanks a ton .

warnquota uses configuration file /etc/warnquota.conf .

In this file , MAIL_CMD = for my configuration .My intention is to run the script . will telnet to MTA thru port 25 and send a mail . Why i use this because i dont have any MUA on my box . Everything seems to work fine .But if you look into the /etc/warnquota.conf ,we can see FROM ,SUBJECT etc but not TO field . I think TO field is get filled by warnquota executable . needs this TO field to work fine . How can i get it . I tried to print echo $TO in , but its empty .

How can i achieve this ?
Old 08-28-2008, 02:59 AM   #4
Registered: Nov 2007
Location: Vinsobres - Drome - France
Distribution: SuSE Linux 11.3
Posts: 152

Rep: Reputation: 19
establish a table with username and mail correspondance like the file aliases.
On that time, a single grep | cut will help you to set the missing "TO"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to assign disk quota(disk space limited) to user and group. hocheetiong Linux - Newbie 1 08-24-2007 05:20 AM
Disk quota for 'virtual' user Bogdan Linux - Server 3 03-01-2007 08:06 AM
how do i set a user disk quota axis Linux - Security 5 09-01-2003 11:33 PM
Limit Disk Quota per user ? mikeshn Linux - General 1 06-19-2003 07:33 PM
Disk Quota for user and group ??? sultan Linux - General 0 05-13-2002 07:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration