Networker

Re: [Networker] FW: NSRADMIN

2003-07-30 15:51:22
Subject: Re: [Networker] FW: NSRADMIN
From: Itzik Meirson <imeirson AT MBI.CO DOT IL>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Wed, 30 Jul 2003 22:49:25 +0200
The easiest one would probably be: (I think first provided by Davina)
"echo p | nsradmin -s ClientName -v 1 -p 390113"
This will provide all information known by the client by the Networker
service/daemon nsrexecd.
Itzik

-----Original Message-----
From: Davina Treiber [mailto:treiber AT HOTPOP DOT COM] 
Sent: Wednesday, July 30, 2003 17:12
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Subject: Re: [Networker] FW: NSRADMIN

On Wed, 30 Jul 2003 10:00:51 -0400, Ciolek, Ken <Ken.Ciolek AT AIG DOT COM>
wrote:

>Anyone know the command to get a list of client versions using NSRADMIN

There wouldn't be much point, the versions stored in the res file are
rarely up to date. The best plan is to query the clients directly. Try
the
following script:

#!/bin/ksh
SERVER=yourserver
echo "  show name; backup command
        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" = "backup command" ]; then
                BUPCMD=$VAL
        elif [ "$ATT" = "name" ]; then
                NAME=$VAL
                if ping $NAME 1> /dev/null; then
                        OSTYPE=unknown
                        VERSION=unknown
                        echo "  show version; client OS type
                                print type: NSRLA" | nsradmin -s $NAME
-p
390113 -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" = "client OS type" ]; then
                                        OSTYPE=$VAL
                                elif [ "$ATT" = "version" ]; then
                                        VERSION=$(echo $VAL | sed
's/"//g')
                                fi
                        done
                        echo "$NAME,$SERVER,$BUPCMD,$OSTYPE,$VERSION"
                else
                        echo "$NAME,$SERVER,$BUPCMD,cannot ping,cannot
ping"
                fi
        fi
done

--
Note: To sign off this list, send a "signoff networker" command via
email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

**************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or  
the 
sender immediately and do not disclose the contents to any one or make copies.

MBI - System Team
**************************************************************************************************

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

<Prev in Thread] Current Thread [Next in Thread>