disk use management (help!)

Adri Verhoef ccea3 at rivm.UUCP
Wed Sep 21 22:59:00 AEST 1988


In article <294 at mars.UUCP> rich at cfi.COM (Rich Baughman -CFI-) writes:
>How many times have you frantically had to answer this question:
>
>    "Who is using up all the #&$%@ space on this disk?!".

>I intend to write a script that will gather disk usage stats nightly and
>allow us to compare current usage with an optimal, historical "snapshot" on
>a directory-by-directory basis.  For reasons of speed, each machine will dump
>its own disk usage stats to a central area.
>- has anyone written or seen an appropriate
>disk management utility?


Maybe I can be of some help.  I had to write a program that counts disk usage
that is used up by all our users per directory on each computer (3B2,VAX: SysV)
and maintains a database and sends reports to the "Disk Administrator" and
warns the users who use too much disk space (according to a specific quotum)
(and eventually, after several warnings, the program will shut them off, i.e.
they can't log in (they only get a special message), until they are given room
to clean up in their homedirectory (or in the directory for which they are
responsible), or they are assigned another quotum).

We have more than 20 computers with system V, and for this utility we have
a person managing this database, user passwords, new users, removal of users,
etc.: the Disk Administrator or, Manager of Disk Capacity.

The fields in the database:
Directory name; Department/Account; Username; Responsible Username; Quotum;
Used up this time; Message counter.

With it goes:
a) a change to the /etc/profile to prevent 'disk abusers' from logging in.
b) the nightly shell-job 'duacct'.
c) the shell-program that makes immediate reports from the database, 'dushow'.
d) 'finddir', a C-program to find directories to a certain depth / level.
e) a file containing additional information for 'disk abusers'.
f) the - easy to maintain - database, with possibility of backing up.
g) a permissions file (for logging in).

The Files:
-rwxr-x---   1 bin      bin        28533 Aug 22 17:55 duacct
-rwxr-xr-x   1 bin      bin         5602 May 24 14:31 dushow
-rwxr-x---   1 bin      bin        15746 Dec 22  1987 finddir

So far I have not been able to write any documentation about it.

Still interested?  If so, write again!

	Adri Verhoef,
	mcvax!rivm!a3



More information about the Comp.unix.wizards mailing list