.\" $HeadURL$ $LastChangedRevision$ .\" .pso ade-config --format=man .so \*[ade_include_prefix]/ade.man .pso mondsk-config --format=man .TH MONDSK 1 "ADE_APP_TOKEN_RELEASE_DATE_MAN" .SH NAME mondsk \- monitor filesystem capacity .br .ne 5 .SH SYNOPSIS .B mondsk \*[ade_standard_synopsis_component] [ .B \-c ] [ .B \-e ] [ .B \-f .I file | .B \-\-config\-file=\fIfile\fR ] [ .B \-m .I addr | .B \-\-mail=\fIaddr\fR ] [ .B \-\-priority=\fIpriority\fR ] [ .B \-s ] .br .ne 5 .SH DESCRIPTION .B Mondsk is a program to monitor disk usage on a per-mounted filesystem basis and alert nominated users when specified thresholds are exceeded. It is most usefully invoked by .B cron\fR(8), say every 10 minutes during office hours. .PP The configuration file consists of empty lines, comments and an ordered set of threshold records. Each threshold record consists of a whitespace separated 'tied' regular expression, which will be compared with the various mountpoints, and a corresponding descending series of percentage thresholds. (A 'tied' regular expression is a regular expression which is automatically prefixed with .B ^ and suffixed with .B $\fR.) The first record in the file that matches is the only one which will be applied. For this reason, some sort of 'catch-all' record should be put last. .PP .B Mondsk reports to stdout, via .B syslogd\fR(8), or by email. The message states the filesystem that has gone over its threshold capacity, the current and threshold capacities and a priority. The priority is the index of the exceeded threshold within the threshold record (e.g. the third threshold represents priority 3). .br .ne 5 .SH CONFIGURATION The configuration file (see .B FILES below) must be set up as described above. .br .ne 5 .SH OPTIONS \*[ade_standard_options_component] .TP .B \-c Echo any messages to the console. .TP .B \-e Echo any messages to the standard output. .TP .B \-f \fIfile\fB\fR, \fB\-\-config\-file=\fIfile\fR Override the default configuration file. If the file is .B \- then standard input is read. .TP .B \-m \fIaddr\fR, \fB\-\-mail=\fIaddr\fR Add .I addr to the default list of users who will be alerted by mail when a threshold is exceeded. Currently the default user list consists of only root. .TP .B \-\-priority=\fIpriority\fR Messages logged via .B syslogd\fR(8), should be logged at the specified priority level. .TP .B \-s Messages should be logged via the .B syslogd\fR(8). .br .ne 5 .SH EXIT STATUS On success .B mondsk returns zero. On failure it returns non-zero and displays a diagnostic message. .br .ne 5 .SH FILES .TP 25 .B \*[mondsk_etc_prefix]/mondsk.conf default configuration file .br .ne 5 .SH ENVIRONMENT VARIABLES None. .br .ne 5 .SH EXAMPLES If \*[mondsk_etc_prefix]/mondsk.conf contains: .IP .nf .fam C # We want to know about / and /usr when it reaches 70% full / 98 90 70 /usr 98 90 70 # /home is much bigger and fills up slower so 95% is acceptable /home 98 97 96 95 # For everything else we wait for 90%. \[md]* 90 .fam T .fi .PP then the .I crontab\fR(1) entry .IP .nf .fam C 0,10,20,30,40,50 8-17 * * 1-5 mondsk -s -m operator .fam T .fi .PP and /usr was 95% full, then priority 2 alerts would be mailed to operator and logged via .B syslogd\fR(8). .br .ne 5 .SH CAVEATS .B Mondsk does not report on unmounted filesystems or filesystems mounted under /mnt, /mnt2, /mnt3 or /media. .br .ne 5 .SH STANDARDS This manual page documents version ADE_APP_TOKEN_RELEASE_ID of .B mondsk\fR. .br .ne 5 .SH SEE ALSO cron(8), crontab(1), df(1), mailx(1), mondsk-config(1), syslogd(8) .br .ne 5 .SH AUTHOR ADE_APP_TOKEN_AUTHOR_NAME .br .ne 5 .SH COPYRIGHT & DISTRIBUTION POLICY Copyright (C) 1995-ADE_APP_TOKEN_RELEASE_YEAR ADE_APP_TOKEN_AUTHOR_NAME \*[ade_standard_copyright_component]