Go to the first, previous, next, last section, table of contents.


noseyparker and editquotas: software quotas

Noseyparker is a script which must be run by root. It is used to give a software warning about users who are hogging your disk. It is run with the command:

noseyparker homedir $(sysadm) [nomail]

The directory homedir should be one of the directories in which user's home directories reside. This is searched for a list of usernames. $(sysadm) is the mail address of the system administrator (which can be obtained from the cfengine variable of the same name) and is used to send information about users who have exceeded certain quotas. The option nomail prevents noseyparker from sending mail automatically to the users concerned.

Although many administrators use the quota checking facilities available in UNIX, there are problems with these. Many users need to generate large temporary files (when generating postscript or TEX, or when performing numerical calculations). Using hard quotas prevents these users from using their accounts effectively. Noseyparker takes the view that most users will tidy up files if they receive a polite reminder -- and the few who cannot be dealt with by other means.

Noseyparker should be run once a week on each home directory on a homeserver. When you run noseyparker, the program generates statistics which it keeps from week to week in order to find out how fast data are growing. If the number of kilobytes for a given user exceeds a limit, a warning is generated: either a pre-warning, a soft warning or a hard warning. If nomail is set, only the system administrator gets a list of these users. If it is not set, then each user gets an automatic message telling him or her to tidy up. The `degree' of the message depends on the extent of the crime. Every user gets at least three `soft warnings' before putting in the boot. The system administrator can see from the mail report which type of warning each user has received.

A default quota is defined in the variable $softlimit. A pre-margin determines how early a pre-warning will be sent. Special quotas for particular users are set using the editquotas script

editquotas homedir

For example, to change the quota of a user whose home directory is on `/mysite/myhost/u2', one writes:

editquotas /mysite/myhost/u2

The file is edited so that it takes the form

username quota
user2    quota2

You can modify noseyparker to suit your own setup if necessary.

Here is a typical command to start noseyparker:

shellcommands: 
 
   homeservers.Sunday::
   
      "$(cfbin)/noseyparker /home/$(host) $(sysadm) nomail"
 
   homeservers.cfengine_model.Sunday::

      "$(cfbin)/noseyparker /$(site)/$(host)/u1 $(sysadm) nomail"


Go to the first, previous, next, last section, table of contents.