QUOTAWATCH
Section: Maintenance Commands (8)
Index
NAME
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
SYNOPSIS
quotawatch [ -t | --trigger percentage ] [ -l | --log ] [ -n | --notify ] [ -r | --reseller ] [ -s | --site-only ] [ -h | --help ] [ -v | --version ] [ address ]
DESCRIPTION
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.
OPTIONS
- -t, --trigger
- Provide a custom percentage that will trigger an alert. If a trigger is provided, it must be an integer between 0 and 100. If a trigger is not specified, a default of 90% is used.
- -l, --log
- Keep a running log of alert notifications that have been triggered. This is useful when running quotawatch as a cron job. Logging will stop notifications being sent out based on the following conditions: if an alert has been sent once on the current day, and the disk quota has not been increased since that alert.
- -n, --notify
- Tell quotawatch to notify (via email) any users who are over the specified trigger value of their disk quota If a whole site is over the trigger value, the admin user for that site will be notified.
- -r, --reseller
- Notify resellers by email when their sites and users are at or over the trigger value of their disk quota.
- -s, --site-only
- Only display sites that are at or over the trigger value of their disk quota in the quotawatch output. Any users that are at or over the quota trigger are ignored. This is useful if you administer multiple servers and lots of sites, as you are only notified of potentially problematic site quota warnings. This also affects the main server admin email alert message and the reseller alert email messages.
- -h, --help
- Display the usage text and exit.
- -v, --version
- Display the version number and exit.
- address
- Optionally provide email address(es) to send over-quota alerts to. Multiple addresses can be used, separated by commas.
EXAMPLES
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
FILES
-
/etc/quotawatch/quotawatch.conf - The configuration file used by quotawatch. See quotawatch (5) for details.
-
/etc/quotawatch/mail.user - The mail message that is sent to standard users who are over your alert trigger. See quotawatch (5) for details.
-
/etc/quotawatch/mail.siteadmin - The mail message that is sent to site administrators when a site is over your alert trigger. See quotawatch (5) for details.
-
/var/lib/quotawatch/alerted - If logging is enabled, a cache of alerted users is kept in this file. This path can be changed via the quotawatch.conf file. See quotawatch (5) for details.
DIAGNOSTICS
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.
WARNINGS
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!
AUTHOR
Tim Littlemore ( tim@littlemore-email.co.uk )
\BUGS
Please report bugs, problems with documentation or feature requests to quotawatch@1steasy.com or quotawatch@littlemore-email.co.uk
Index
This document was created by
man2html
, using the manual pages - then tweaked a
lot
!
top