Section: Maintenance Commands (8)
Index
quotawatch - display or send an alert describing users/sites on an Ensim server that are at or over a specified percentage of their disk quota
quotawatch [ -t | --trigger percentage ] [ -l | --log ] [ -n | --notify ] [ -r | --reseller ] [ -s | --site-only ] [ -h | --help ] [ -v | --version ] [ address ]
The quotawatch script was written to enable server administrators to be made aware of disk quota usage on an Ensim server. For some reason, this functionality is not included in Ensim. Using the same Ensim scripts that are used to display usage info in the various control panel screens, quotawatch recursively checks the disk quota of each site and each site's users on the server and displays any quotas that are over a specified trigger value (a default of 90% can be used). As well as displaying results on screen, quotawatch can send the results via email to a specified address. Quotawatch can also be told to notify any users and site administrators if they, or their site, are over the trigger value. The emails that are sent to users and site administrators are customisable, and can be changed by editing the mail files in /etc/quotawatch/. You can quickly check for sites/users which are using 90% or more of their disk quota by using quotawatch without arguments. Quotawatch is ideally suited to being executed regularly as a cron job.
To email admin@domain.com when a site/user is using 75% or more of their quota:
quotawatch --trigger 75 admin@domain.com
To email admin@domain.com and support@domain.co.uk when a site/user, who hasn't been notified already today,
is over the default quota:
quotawatch --log admin@domain.com,support@domain.co.uk
To view all disk quotas on screen and notify all users who are over 95% of their quota:
quotawatch --notify -t 95
/etc/quotawatch/quotawatch.conf
/etc/quotawatch/mail.user
/etc/quotawatch/mail.siteadmin
/var/lib/quotawatch/alerted
If the quotawatch.conf file is missing, or cannot be read by quotawatch, the following message will be output:
WARNING - Could not open the quotawatch config file, user/site admin notification emails may not display correctly.
Currently, the config file is not crucial to the operation of quotawatch, but if the
-n
(or
--notify
) option has been used, the lack of this config
file can cause problems with the content of your notification emails.
Be careful when specifying custom trigger values when using user notification. If you were to use a trigger of 0% quota usage and pass the --notify or -n option, you would email ALL users and site administrators on the server, warning them that they are using over 0% of their disk quota! Be especially careful that such a set up does not end up in any quotawatch cron script; within a few hours, you will have irritated the majority of your customers! You should enable logging with --log or -l , or at least keep custom trigger values fairly high (use the default 90%) in any cron jobs that call quotawatch to avoid sending unnecessary warnings. You have been warned!
Tim Littlemore ( tim@littlemore-email.co.uk )
\Please report bugs, problems with documentation or feature requests to quotawatch@1steasy.com or quotawatch@littlemore-email.co.uk
This document was created by
man2html
, using the manual pages - then tweaked a
lot
!
top