cancel
Showing results for 
Search instead for 
Did you mean: 

CLI equivalent for Windows environment that will list all clients and their NBU version

newbie_girl
Level 3
Can anyone provide me the cli command (for Windows) that show clients NBU version.  Perfect output would be the Client Properties view from the java or admin console.  Thank you in advance!

5 REPLIES 5

J_H_Is_gone
Level 6

 

it has to go out and query every server.  (script is written for unix) (not my script, but don't remember who I got it from- but it works great)


#!/bin/ksh

 

PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd

 

echo " Client \t OS Level \t Release"

echo "=====================\t =================\t ======="

for c in `bpplclients -allunique -noheader | awk '{print $3}'`

do

bpgetconfig -s $c -L -A | \

awk -F'=' '{if($1~/Client.OS/){os=$2}

if($1~/Patch/){r=$2}}

END {printf("%-22s\t%-18s\t%s\n","'$c'",os,r)} '

done


The bpgetconfig command will work on windows for just one client - you would have to re-write script for windows.

Andy_Welburn
Level 6
Altho' the line beginning with END looks somewhat different in mine:

END { if(p~/^ *$/){r=v}else{r=p}
      printf("%-22s\t%-25s\t%s\n","'$c'",os,r)} '

but don't ask me to explain it!

Output will look similar to:

Client        OS Level                        Release
=======   =================   =======
client1       SunOS 5.9                    6.5
client2       SunOS 5.9                    6.5
client3        Windows2003 5            5.1
client4        Windows2003 5            5.1
client5        Windows2003 5            6.5.1
client6        Windows2003 5            6.5
client7        Linux 2.6.22.1-32.fc6    6.5

newbie_girl
Level 3
Thank you everyone for your feedback, but I have been unsuccessful in coverting those for a Windows master server environment. :(

J_H_Is_gone
Level 6
run the command
bpplclients -allunique -noheader  > clientlist.txt

take the clientlist.txt into excell, do a text to columns, remove 1 and 2 leaving you with just the list of clients, put that back into your text file

then run

for /F %x in (clientlist.txt) do bpgetconfig -s %x -L -A

you get info for each client in the file, just not neat like Andys exmaple.


(and this is comeing from a unix person!)  Any dos person out there able to take it the rest of the way?