I've written a script which I want to collect version information on all the clients (we have a large network) but unfortunately I don't think the command:

/usr/afs/bin/rxdebug $vldb -all

gets them all. From the email yesterday, it sounded like I might have to run this against some other boxes? Could you clarify that for me please? The script is below for anyone who wants it.

Cheers,

Ed.

#!/usr/bin/perl

use Socket;

# get list of all AFS connected hosts
$vldb="rsl155";
@servers=`/usr/afs/bin/rxdebug $vldb -all | grep host`;
@servers=map (getip($_),@servers);

# remove dupes from @servers
%temp_hash;
undef @[EMAIL PROTECTED];
@servers = keys %temp_hash;

# get AFS version for each server
foreach $ip ( @servers ){
        $version=`/usr/afs/bin/rxdebug $ip 7001 -version | grep version`;
        chomp $version;
        $version=~/AFS version:\s*(.*)/;
        $version=$1;
        $host=gethostbyaddr( inet_aton($ip), AF_INET );
        $hosts{$host}=$version;
}


foreach $host (sort keys %hosts){
        print "\n$host:$hosts{$host}";
}
print "\n\n";

sub getip{
        my ($line)[EMAIL PROTECTED];
        $line=~/(\d+\.\d+\.\d+\.\d+)/;
        $ip=$1;
        return $ip;
}





> To: [email protected]
> From: [EMAIL PROTECTED]
> Subject: [OpenAFS] Re: list all AFS clients
> Date: Tue, 8 Aug 2006 09:21:05 -0400
>
> Edward Quick wrote:
>
> > Is there an AFS command I can run to list all the boxes with clients? I
> > doubt it, but thought I'd ask just in case!
>
> Depending on how big a setup you have, you can scan the network for
> clients.  Roughly:
>
> for machine in $all_client_machines; do
> rxdebug $machine 7001 -version
> done
>
> I have a cron job that does this periodically and keeps a database with the
> info.  This has been very useful in keeping things up to date.
>
> It obviously won't catch offline machines though.
> -- 
> Joe Buehler
>
> _______________________________________________
> OpenAFS-info mailing list
> [email protected]
> https://lists.openafs.org/mailman/listinfo/openafs-info


Be one of the first to try Windows Live Mail.

Reply via email to