Re: [Networker] FW: NSRADMIN
2003-07-30 10:12:10
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.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
|
|
|