cancel
Showing results for 
Search instead for 
Did you mean: 

Print NetBackup Policy info in a similar format to the GUI "Summary of All Policies"

stefanlasiewski
Level 3
Greetings,

I am looking for a Commandline tool which prints Netbackup Policy information,

For example, I can see this information from the GUI, under "NetBackup Management: Policies: Summary of All Policies: Clients".

Policy Client Name Hardware Operating System
----------------------------------------------------------------------
Policy_A HOSTA Solaris Solaris9
Policy_B HOSTB Linux RedHat2.4
Policy_C HOSTA Linux RedHat2.4
Policy_D  HOSTA Linux RedHat2.4
Policy_E webserver.example.com Solaris Solaris9
NFS nfs1.example.comLinux RedHat2.4
ORACLE oracle.example.com Linux RedHat2.4


Is there a commandline equivalent which prints this information in the same format? bppllist prints this information in a completely different format.

Thank you,

-= Stefan
1 ACCEPTED SOLUTION

Accepted Solutions

Stumpr2
Level 6
DOCUMENTATION: How to see the command line operations that are being run by the jnbSA Java GUI
 
 
Details:
Manual: NetBackup DataCenter 4.5 System Administrator's Guide for UNIX

Modification Type:  Addition

Modification:
In order to see the command line operations that are being run by the jnbSA & jbpSA Java GUI, perform the following actions:

1. On the system where you are running the Java GUI go to the java directory.
# cd /usr/openv/java

2. Edit the "Debug.properties" file.
# vi Debug.properties

3. Uncomment "printcmds=true" line.
printcmds=true
Uncommenting printcmds=true will log command lines and their output to the java log file.

Note: In the NetBackup 5.x and 6.0 releases a new option "printCmdLines=true" is available.  This option prints only the command lines to the java log file without including the output which will result in smaller log files.  It is only necessary to uncomment one of these entries.  The Debug.properties file in these releases contains additional notes on using these options.

4. Start the NetBackup Java GUI.
# jnbSA
The default log location is: /usr/openv/java/logs/<user name>.<jnbSA/jbpSA>.<PID>.log
The -l <logfile> option can be specified to write to a specific <logfile>.

5. Examine the resulting log to view the commands being run by the GUI.

View solution in original post

9 REPLIES 9

Stumpr2
Level 6
you can see what command the GUI is sending by creating a logfile.
 
 

stefanlasiewski
Level 3
Thanks for the reply.

I'm a little unclear what you mean... should I create the logfile on the Client, or on the Server?

I just looked through the manual, and couldn't figure out how to create a logfile for on the Client side. I see a reference to 'logFile' in some of the startup files.

I know how to create logfiles on the server side, but I'm not clear which logfile will contain this information.

Thanks again. You provide many useful replies in these forums.

-= Stefan

Darren_Dunham
Level 6
Not everything displayed in the GUI is visible via a single command line.  I think besides clicking on the "Summary of All Policies", you're also clicking on the "Clients" bit underneath, yes?  (without that, I can't get the client names that are in your example).

There's no single command I'm aware of that duplicates that output.  The information is available from 'bppllist', but not in that format.

This comes pretty close for me, but you might want to massage it further to get better output:
bppllist -allpolicies -L | egrep '^(Policy Nam|Client/HW)'

--
Darren

Darren_Dunham
Level 6
Or heck, if you really want something closer, maybe this would do most of what you want:

bppllist -allpolicies -L | perl -lne 'if (/^Policy Name:\s*(\S+)/){$pol=$1;} elsif(/^Client.HW.OS.Pri:\s*(\S+\s+\S+\s+\S+)/){print "$pol $1";}'

(That's really all on one line...)

--
Darren

stefanlasiewski
Level 3
Excellent! Thanks for the oneliner.

That will definately get me going in the right direction.

Stumpr2
Level 6


stefanlasiewski wrote:
Excellent! Thanks for the oneliner.


sorry , i wasn't much help. I've been swamped. But here is  one liner.
Take my wife...please!
 
 

Stumpr2
Level 6
DOCUMENTATION: How to see the command line operations that are being run by the jnbSA Java GUI
 
 
Details:
Manual: NetBackup DataCenter 4.5 System Administrator's Guide for UNIX

Modification Type:  Addition

Modification:
In order to see the command line operations that are being run by the jnbSA & jbpSA Java GUI, perform the following actions:

1. On the system where you are running the Java GUI go to the java directory.
# cd /usr/openv/java

2. Edit the "Debug.properties" file.
# vi Debug.properties

3. Uncomment "printcmds=true" line.
printcmds=true
Uncommenting printcmds=true will log command lines and their output to the java log file.

Note: In the NetBackup 5.x and 6.0 releases a new option "printCmdLines=true" is available.  This option prints only the command lines to the java log file without including the output which will result in smaller log files.  It is only necessary to uncomment one of these entries.  The Debug.properties file in these releases contains additional notes on using these options.

4. Start the NetBackup Java GUI.
# jnbSA
The default log location is: /usr/openv/java/logs/<user name>.<jnbSA/jbpSA>.<PID>.log
The -l <logfile> option can be specified to write to a specific <logfile>.

5. Examine the resulting log to view the commands being run by the GUI.

Darren_Dunham
Level 6
I don't know how far back it works, but at least in 6.0 you can do the same thing just by using the '-lc' option on the admin tool (and then looking in the log file).

# jnbSA -lc

And it doesn't seem complete when I use it.  As an example, the activity monitor shows no commands (and I'd expect some form of bpdbjobs at least).

--
Darren

stefanlasiewski
Level 3
I appreciate your help.

Sadly, the debug output doesn't show the table formatting information.

The debug output shows that NetBackup calls the 'bppllist' command, which prints a very lengthy list of policy information.

"/usr/openv/netbackup/bin/admincmd/bppllist" -allclasses -tzo -25200 -template -M backup1.foo.example.com

The jnbSA client takes this information and prints it in a pretty format. I was hoping to borrow the pretty format from NetBackup.