Networker

Re: [Networker] How do I get a list of all clients being backed up?

2005-12-20 06:17:23
Subject: Re: [Networker] How do I get a list of all clients being backed up?
From: Davina Treiber <DavinaTreiber AT PEEVRO.CO DOT UK>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 20 Dec 2005 10:47:58 +0000
David Ranieri wrote:
Someone posted this script that I have been using and it works pretty well. I run awk against the output to report just the information Im looking for.
root@sunlegato# more showclientbynode
#!/bin/ksh
# showclientsbynode
SERVER=${1:-$(uname -n)}
echo "
        show name; storage nodes
        print type: NSR client
        " | nsradmin -s $SERVER -i - \
| sed 's/;//' | while read LINE; do
        ATT=$(echo $LINE | cut -d: -f1 | sed 's/^ //')
        VAL=$(echo $LINE | cut -d: -f2 | sed 's/^ //')
        if [ "$ATT" = "name" ]; then
                NAME=$VAL
        elif [ "$ATT" = "storage nodes" ]; then
                SNODE=$(echo $VAL | sed 's/,/ /g')
                echo "$SNODE,$NAME"
        fi
done | sort -u


I claim authorship of that script. :-)
Glad it's been useful to you.

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu 
if you have any problems
wit this list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER