[OpenAFS] Re: quota monitoring
Wed, 27 Aug 2003 11:34:02 -0700
Heiko Schulz <firstname.lastname@example.org> writes:
> Here is a corresponding stupid script, called via cron:
> rm -f $LOG
> touch $LOG
> $VOS listvldb -quiet -noauth | grep home | while read vol
> 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 (email@example.com) <http://www.eyrie.org/~eagle/>