I first tried building a compound rsh command, but our filer had too many qtrees (54 in 2 volumes) so the filer rejected the rsh command line as "too long". That prompted me to put the commands into a file and use the "source" command to run it.
Just something you may need to watch out for as you add qtrees.
I'm running ~5.3.6 on most of my filers, so that command is not
available. I followed the same idea though, and simply had an awk statement construct a compound rsh command to the filer (sorry again... extreme line length warning):
% rsh nbc-na1 rdfile /etc/quotas | awk 'BEGIN { printf "rsh -n $FILER "; } ($2 == "tree") { printf("quota report %s \\; ", $1); } END { print " df \\; df -i | fgrep -v /.snapshot"; }' rsh -n $FILER quota report /depot \; quota report /local \; quota report /local-adm \; quota report /local-vs \; quota report /local-vs2.6 \; quota report /nbc \; quota report /fp-cnf \; quota report /tor-adm1 \; quota report /tor-dev1 \; quota report /tor-dev2 \; quota report /tor-fp1 \; quota report /tor-fp2 \; quota report /tor-vs1 \; quota report /tor-vs2 \; quota report /tor-vs3 \; quota report /tor-vs4 \; quota report /tor-vs5 \; quota report /tor-vs6 \; quota report /tor-vs7 \; quota report /tor-vs8 \; quota report /tor-vs9 \; quota report /tor-vs10 \; quota report /tor-vs11 \; quota report /tor-vs12 \; quota report /www-home \; quota report /www1 \; quota report /www2 \; quota report /cgi \; df \; df -i | fgrep -v /.snapshot
In the actual script, the initial "rsh $FILER rdfile /etc/quotas ..."
command is backquoted to a variable first, then the variable is eval'd (thus the presence of the \'s). This satisfies two of my requirements: no need for anything besides awk and rsh on your admin host, and no need to have the filer root mounted. I do have to rely on the hidden "rdfile" command to get access to /etc/quotas, but I can live with that for now. -- Brian Tao (BT300, taob@risc.org) "Though this be madness, yet there is method in't"
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support