Early Warning OverQuota
  Early Warning OverQuota - Home  

  Part of Home site:
  http://akakul.co.uk/

  Scripts Home

Summarizer Summarizer
RAQ RAQ File Convertor
FAQ
Useful Links
db.cache (DNS)
CPU Temp Alert
Resolving NS Check
OverQuota Check


 

Welcome to the home of Kuls 'Early Warning OverQuota' script

This page deals with Early Warning OverQuota on Cobalt/Sun RaQ3's & RaQ4's specifically, though it may be customizable to any Linux machine.
Tested/Used on RaQ3 & RaQ4's.

This script collects all the 'quota' details for both sites & users and reports any that fall within the predefined limit for reporting. This can be either a percentage (ie 90% - anyone using 90% or more will get reported), or in Kb (ie. 10240 - anyone with less than 10meg of their quota remaining will get reported). The report can be to STDOUT, or to an email address (defined within the script).
This script is mainly used to prempt the 'over quota' messages that the RaQ3/4 GUI (Brian/Sabrina) will report (swatch).


This small script needs to be installed via Shell (Telnet/SSH) and set to run from 'crontab' (or similar), or can be run manually. This script MUST be run as the 'root' user as 'root' is the ONLY user allowed to see everyones quota's when using 'repquota' command. The script should be owned by 'root.root' and have '0700' permissions.

Source Formats Available: Plain Text (Unix) | GZ (GZiped Compressed) | ZIP (Windows Format Compressed), Download your chosen Format now

Installing

You can either download your chosen format to the server directly (recommend GZ file), or to your PC and FTP (this is a UNIX file and should be uploaded as BINARY - NOT ASCII) up to a user account, then move the script to somewhere that only 'root' can see/alter it, or use SCP/SFTP instead of the insecure FTP.

su -

{ENTER YOUR ROOT PASSWORD IF/WHEN PROMPTED}

cd /root
wget http://scripts.akakul.co.uk/code/early_warning_overquota.sh.gz
gunzip early_warning_overquota.sh.gz
chown root.root early_warning_overquota.sh
chmod 700 early_warning_overquota.sh

Now you can either run it manually (without any parameters), and it will use the default settings, or continue on to setting 'crontab' to run it.
You can run from crontab by EITHER of these methods:

  • Edit 'root's crontab, and insert this (or similar): [HowTo Use Crontab]
    0 0 * * * /root/early_warning_overquota.sh
  • Create a symbolic link in the cron.daily directory
    ln -s /root/early_warning_overquota.sh /etc/cron.daily/early_warning_overquota.sh

Refernces:
  • See the script for detailed information on cofiguration.

 © akaKul.co.uk