cancel
Showing results for 
Search instead for 
Did you mean: 

command line equivalent for detect operating system in policy tab

Sid1987
Level 6
Certified

Hi Techiz,

 Please let me know if there is any command line equivalent for the action we do "detect operating system" in policies for any client.

I want to update it on all clients in my environment to update there os by detecting which in turn runs bpgetconfig i guess and updates the info.

Thanks

Sid

22 REPLIES 22

Tape_Archived
Moderator
Moderator
   VIP   

bpgetconfig -s client_name -L

OR 

bptestbpcd -client client_name -verbose

Check for PLATFORM from the output. You may also try using "-l" for short listing.

 

Thanks for the reply, You didn't understand the question, in netbackup 7.7 there is an option when you add or update a  client in a policy you can detect the operating system, I need command line equivalent for updating client os by detect option in GUI.

Hello,

Interesting, Any specific reason for looking that command?

The option "Detect Operating System" is applicable for Windows client only. For unix and linux we have to select the operating system manually from drop down list. 

The "bpgetconfig" and "bptestbpcd" command only applicable if client mahcine part of NBU master environment.

I didn't find yet any specific command run in background to detect the operating system. Got less time today to resarch. I am planing to reproduce this issue, may be nbsl and nbproxy give us some hint. Keep you update...

Thanks & Regards,

Sid1987
Level 6
Certified

@Tousif, that's not true, it works for Unix operating system as well, at least 7.7.3 does. There must be a command in background which checks the OS by may be bpgetconfig and then updates using bpplclients, I can use a script to do it, However I am checking what does Netbackup do in background.

quebek
Moderator
Moderator
   VIP    Certified

Hello

I did review today the JAVA logs when was trying to add a new client with autodetection enabled, and here are its logs:

ICACHE.PBXIOPCredsHandler-> ServiceContext registered.
(ObjSvc)Symantec.NetBackup.SL.ClientMgmt.ClientQueryFacet.isClientPingable,,699
Request ID: 732
Server: nbumaster
Time Taken: 699ms
Successful:
Reply Status: Successful

ErrorHandler--->(isClientPingable) Status Code: 0 -> .
getClientHWOS clientName: nbuclient
ICACHE.PBXIOPCredsHandler-> ServiceContext registered.
(ObjSvc)Symantec.NetBackup.SL.ClientMgmt.ClientManager.aqueryFacet,,185
Request ID: 734
Server: nbumaster
Time Taken: 185ms
Successful:
Reply Status: Successful

ErrorHandler--->(aqueryFacet) Status Code: 0 -> .
vrts.nbu.admin.icache.NBGUIORBConfigurator:192.168.229.233:1556:nbsl_secsvc
[28-03-2017 10:54:22:384] jacorb.orb.giop:INFO: ClientConnectionManager: found ClientGIOPConnection to 192.168.229.233:1556:nbsl (42ce6a87)
ICACHE.PBXIOPCredsHandler-> ServiceContext registered.
(ObjSvc)Symantec.NetBackup.SL.ClientMgmt.ClientQueryFacet.getClientHWOS,,3167
Request ID: 736
Server: nbumaster
Time Taken: 3167ms
Successful:
Reply Status: Successful

ErrorHandler--->(getClientHWOS) Status Code: 0 -> .
Returning getClientHWOS, clientName: nbuclient, hardware: PC-x64, os: WindowsXP
ICACHE.PBXIOPCredsHandler-> ServiceContext registered.
(ObjSvc)Veritas.NetBackup.HostSessionFactory.getResilentNetworkStatus,,193
Request ID: 738
Server: nbumaster
Time Taken: 193ms
Successful:
Reply Status: Successful

ErrorHandler--->(getResilentNetworkStatus) Status Code: 0 -> .
ICACHE.PBXIOPCredsHandler-> ServiceContext registered.
(ObjSvc)Symantec.NetBackup.SL.PolicyMgmt.PolicyManager.amodifyFacet,,215
Request ID: 740
Server: nbumaster
Time Taken: 215ms
Successful:
Reply Status: Successful

Then I tried to grep for this client in all logs on master... nothing was found so looks like this is some Java query... or my query was wrong ...

Hello,

Correction to my last post..

Today I tested on NBU 7.7.3 and yes you are correct. Its detecting all clients operating system.

Also removed clients from client list and all reference and run bpgetconfig -s clientname -L and recieved expected output.

I am resarching more on it..

 

Thanks & Regards,

Sid1987
Level 6
Certified

I am gonna try bpgetconfig and see if it gives exact definition of OS as chosen by autodetect feature in GUI.

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

https://www.veritas.com/support/en_US/article.TECH37628

Is the results from bpgetconfig not accurate?

Thanks Riaan for the reply, as per my testing, bpgetconfig works fine for Unix clients, for windows they detect as PC However when you autodetect them from policy GUI they are detected as windows 2008 x64 So I would say no autodetect doesn't use bpgetconfig in background. If I use bpgetconfig somehow I will have to use bpplclients <policy name> <hostname> -hardware -os to update it through command line.

Actually my issue is I see many clients updated wrong as their os which works fine in terms of backup as long their actual os matches with policy type. But i need to update all clients by autodetecting their hardware/os.

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Honestly, i'd not pay much attention to that since last time i checked, nobody had bothered to add Windows 2012 to the list. Not to mention, Windows 2016...

@RiaanBadenhorst, I agree it doesn't effect anything, However my primary query is when you do auto detect operating system in policy for a client what commands does it do in background. Because it seems nobody knows.

mph999
Level 6
Employee Accredited

I had a look at this, and I couldnt find any command that does the same thing.  Not always, but in some cases the GUI does 'run a command' and this can be seen in user_ops/nbjlogs.  In this case it doesn't log any command when you do the OS discovery.  The man page / caommand ref guide didn't show anything either.

I think unfortunately, it's a GUI only feature.

Sid1987
Level 6
Certified

Thanks @mph999, If it's just a GUI feature it does pull data from somewhere, I think I will have to raise a case with Veritas.

mph999
Level 6
Employee Accredited

A support call won't tell you anything different than I am (I am support ...)

From your query:

"Please let me know if there is any command line equivalent for the action we do "detect operating system" in policies for any client."

The answer is no, it's a GUI only feature, there must be a entry for the master server in bp.conf on the client you are adding to a policy, as the master contacts the client to get the OS type.

What do you mean when you detect a Windows client it only detects them as PC and not PC-x64 Windows 2008? I see the OS versions when I run bpgetconfig.

Could you please post your output when you run bpgetconfig?

Here is my ouput against several clients with varying OS's.

[root@<mediaserver> admincmd]# ./bpgetconfig -g <win_client> -L
Client/Master = Client of <master server>
NetBackup Client Platform = PC-x64, WindowsXP
NetBackup Client Protocol Level = 7.7.3
Product = NetBackup
Version Name = 7.7
Version Number = 770000
NetBackup Installation Path = C:\Program Files\Veritas\NetBackup\bin
Client OS/Release = Windows2008 6

 

[root@<mediaserver> admincmd]# ./bpgetconfig -g <win_client2> -L
Client/Master = Client of <master server>
NetBackup Client Platform = PC-x64, WindowsXP
NetBackup Client Protocol Level = 7.7.1
Product = NetBackup
Version Name = 7.7
Version Number = 770000
NetBackup Installation Path = C:\Program Files\Veritas\NetBackup\bin
Client OS/Release = Windows2003 5

[root@<mediaserver> admincmd]# ./bpgetconfig -g <win_client3> -L
Client/Master = Client of <master server>
NetBackup Client Platform = PC-x64, WindowsXP
NetBackup Client Protocol Level = 7.7.3
Product = NetBackup
Version Name = 7.7
Version Number = 770000
NetBackup Installation Path = C:\Program Files\Veritas\NetBackup\bin
Client OS/Release = Windows2012 6

 

As @mph999 was saying, the actual call that the Java GUI makes would be I assume a CORBA function or Java object which you won't replicate using Netbackup commands.

@mph999@GeForce123Thanks for the reply, Actually for Unix systems I can automate it by getting details from "NetBackup Client Platform" However for Windows I will have to combine "Client OS/Release" as well. If it's a java option only then could you tell me a way I can detect operating system for all the clients under a master server? As in my environment people have selected wrong OS which doesn't effect the back as long as policy type matches with the actual OS type. However I would want to have the clients with correct operating system. As I could see in GUI i have to select each client and do a detect, it doesn't support select multiple and then do a detect.

mph999
Level 6
Employee Accredited

There is no way to do it automaticaly, as per the GUI as I think we have agreed.

You would have to script the output of bpgetconfig and then use the bpplclients command with the modify option to change the OS.

 

Sid1987
Level 6
Certified

Thanks @mph999 I am working on it, my environment doesn't has all types of OS, could you or anyone provide all test cases for bpgetconfig output so I can create a global script which could be helpful for veritas also.

quebek
Moderator
Moderator
   VIP    Certified

Hello

On today I came across this TN: https://www.veritas.com/support/en_US/article.000006640

should be helpful to you...