[OpenAFS] Re: quota monitoring

Russ Allbery rra@stanford.edu
Wed, 27 Aug 2003 11:34:02 -0700


Heiko Schulz <hrs@mathematik.uni-stuttgart.de> writes:

> Here is a corresponding stupid script, called via cron:

>>>>>>>>>>> 
> #!/bin/sh

> LOG="/tmp/check_home_vols.log"
> VOS="/usr/afs/bin/vos"
> rm -f $LOG
> touch $LOG
> warncapacity="90"

> $VOS listvldb -quiet -noauth | grep home | while read vol
> do
>   vosexa=`$VOS exa $vol -loc`

An optimization is, rather than getting a list of volumes with listvldb
and then calling vos examine on each one, to instead use vos listvol with
the -long option.  It spits out the same format of information as vos
examine but does the whole server or partition at the same time.

You do have to do more complex parsing then, though, and I'd probably drop
to Perl at that point.

We take that a step further and call vos listvol -long on all of our
servers every night and then load all that data into a database and do
various SQL-based reporting off of it.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>