Formatting the output from the bpdbjobs command in VERITAS NetBackup (tm) 4.5 and 5.x
Details:The method in which the format of the bpdbjobs report is controlled changed in VERITAS NetBackup (tm) 4.5. This is now controlled by adding BPDBJOBS_COLDEFS entries to the /usr/openv/netbackup/bp.conf file on the master server.
Add a BPDBJOBS_COLDEFS entry for every column you wish to include in the output using the following format:
BPDBJOBS_COLDEFS = COLDEFS_ENTRY [minimum_size [true | false]]
where:
COLDEFS_ENTRY is the name of the column to include in the output.
See the table below for valid BPDBJOBS_COLDEFS entries.
minimum_size is the minimum column width.
If not specified, the default is a width of 5.
true indicates that the column should expand as needed.
If not specified, true is the default.
false indicates that the column should not expand beyond the minimum_size.
Any entries larger than the minimum_size will be truncated.
Note: For the BPDBJOBS_COLDEFS option to be recognized, the minimum_size must be present when setting a value for [true | false]. Invalid options will be ignored in the bp.conf file.
Valid options:
BPDBJOBS_COLDEFS = JobID
BPDBJOBS_COLDEFS = JobID 5
BPDBJOBS_COLDEFS = JobID 5 true
Invalid option:
BPDBJOBS_COLDEFS = JobID true
The order of the entries determines the order that the column headings will appear when bpdbjobs is run. The NetBackup daemons do not need to be restarted for these options to take effect. Simply add the option to the bp.conf file, save, and then re-run the bpdbjobs command.
Sample entries in the bp.conf file:
Note that these are the default columns for NetBackup 4.5 and 5.x. Also note that if there is only one BPDBJOBS_COLDEFS entry in the bp.conf file, there will only be one column in the output from bpdbjobs. Thus, adding at least one entry to bp.conf will remove all defaults in favor of the bp.conf list. Therefore, specify all the columns necessary to get the required output. To restore the default options for bpdbjobs, remove all BPDBJOBS_COLDEFS entries from the bp.conf file.
BPDBJOBS_COLDEFS = JobID 5 true
BPDBJOBS_COLDEFS = Type 4 true
BPDBJOBS_COLDEFS = State 5 true
BPDBJOBS_COLDEFS = Status 6 true
BPDBJOBS_COLDEFS = Policy 6 true
BPDBJOBS_COLDEFS = Schedule 8 true
BPDBJOBS_COLDEFS = Client 6 true
BPDBJOBS_COLDEFS = DstMedia_Server 12 true
BPDBJOBS_COLDEFS = ActPID 10 true
The default output will look like this:
# /usr/openv/netbackup/bin/admincmd/bpdbjobs
JobID Type State Status Policy Schedule Client Dest Media Svr Active PID
1 Backup Done 0 test1 full firefly firefly 15965
A bp.conf file with the following entries:
BPDBJOBS_COLDEFS = JobID 5 true
BPDBJOBS_COLDEFS = Type 4 true
will result in the output with only these two columns:
# /usr/openv/netbackup/bin/admincmd/bpdbjobs
JobID Type
1 Backup