Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have configured quota on our linux server. But now I want to make a script which should keep watching the quota status all the time & when any user exceeds quota it should mail me & the user regarding the quota limit exceeded.
I dont want the cron job to do that. Any help will be highly appreciated.
Thanks in Advance
Sushant Chawla
Linux Administrator
Hi Vikas firstly I would like to thank you for giving me ur precious time.
Now the situation is I am using this quota command but it is not showing any output then how can I filter its contents. But still it is sending mails to the users who have exceeded quota limit.
Hi Vikas firstly I would like to thank you for giving me ur precious time.
Now the situation is I am using this quota command but it is not showing any output then how can I filter its contents. But still it is sending mails to the users who have exceeded quota limit.
Strange, this should work. Give the details of you OS.
1)try
Code:
repquota -a
.
2)Are you sure you are root ?
3)What is the output after running the command ?
4)Paste the output of
Code:
quotacheck -av
.
Always, give details of the OS (cat /etc/redhat-release)
and paste output of commands in your threads.
repquota -a command is working & I am using it from starting for report generation of users using quota.
But I want a script that will invoke as soon as any user crosses the quota limit. The script in the background will take the unnecessary resources of server. I want the script will be invoked only when any user crosses the quota limit
repquota -a command is working & I am using it from starting for report generation of users using quota.
But I want a script that will invoke as soon as any user crosses the quota limit. The script in the background will take the unnecessary resources of server. I want the script will be invoked only when any user crosses the quota limit
Could you please attach or paste repquota -a output here.
I dont have quota on any of my systems, I need a sample file.
repquota -a command is working & I am using it from starting for report generation of users using quota.
But I want a script that will invoke as soon as any user crosses the quota limit. The script in the background will take the unnecessary resources of server. I want the script will be invoked only when any user crosses the quota limit
Quotas are checked by running:
quotacheck -av
So this has to be repeated once in a while (for example through cron; the sleep example is of no use I think, just check once every (10) minutes)
Checking the quotas is not a realtime operation.
It does only happen when you ask to do it.
Depending on your output you can use the warnquota.conf configuration file to customize the mail sent to the user.
Or you can write a script that parses the output of quotacheck -av and does the necessary things
I'm just setting up quotas now, and am very happy with "warnquota -s".
I've added this command to a cron job that runs every night, so that when people come to work in the morning they have a bunch of quota warning mails to keep them busy for a while.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.