On Thu, 2 Jun 1994, Stephen Chan wrote:

> 
>       Is there a way to poke around on the servers and get a listing of all
> the clients which have grabbed files from that server?
> 
>       Alternately, could I set some debugging mode on the server processes,
> feed the output through a filter which will extract all client connects?
> 
>       Our user community is none too hip about responding to our requests
> for usage information.        

Try:

#!/bin/ksh

if [[ $# = 0 ]]; then
        echo "Usage: $0 <server 1> ... <server n>"
        exit 1
fi
for n; do
        /usr/afsws/etc/rxdebug -servers $n -allconn
done | grep '^Connection' | \
while  read x y z ipaddr rest; do echo $ipaddr; done | sort -u |
while read ipaddr; do
        ipaddr=${ipaddr%%,}
        n="`nslookup $ipaddr`"
        n="${n##*Name: }"
        n="${n%%Address:*}"
        n="${n##*([ ])}"
        n="${n%?}"
        echo "$n ($ipaddr)"
done


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke  -  [EMAIL PROTECTED] -or- [EMAIL PROTECTED]        O__
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland   > |
Phone: +41 22 767 4911    Fax: +41 22 767 7155                        ( )\( )


Reply via email to