How to use the “vxlogview” command
To view unified log entries for a specific job ID
The “-X <context_token>” option can be used to display unified log entries based on Job ID. This will show all unified log entries related to a specific job ID. This command will not show logs for all jobs in a multi-streamed job.
For example, to display messages for a Job ID 12345 use the command:
#vxlogview -p 51216 -X "jobid=12345"
For multi-streamed jobs a query can be used to search for multiple job Id’s:
# vxlogview --where "((ctx = 'jobid=1561')|| (ctx = 'jobid=1562')) && (stdate >= '10/25/2005 02:00:00PM')"
To view unified log entries for a specific start or end date
The “-b <start_time>” and “-e <end_time>” options can be used to display messages between a given date range. These can also be used separately to see anything before or after a specific time. The format of the <start_time> and <end_time> are” MM/DD/YY HH:MM:SS AM|PM”. The date, time and AM or PM identifier must be present in the command.
For example, if a job started at 1:30pm and failed around 2:32pm the following command can be used to see all messages that occurred between these times.
# vxlogview -p 51216 -b "07/21/05 1:30:00 PM" -e "7/21/05 2:32:00 PM"
To view unified log entries within the last time interval
The “-t<hours:minutes:seconds>” can be used to view all unified Log entries that have occurred within the last time interval. This can be used to display the logs from the last X hours, or minutes or even seconds.
For example, to display the unified logs from the last hour and 30 minutes run the following:
# vxlogview -p 51216 -t 01:30:00
To view unified log entries based on severity:
The following options exist to display unified log entries based on severity. These must be used with the “-L” option to display application type messages. Without the “-L” option the following entries will be ignored.
-W Display any errors flagged as: [Warning]
-E Display any errors flagged as: [Error]
-C Display any errors flagged as: [Critical]
-M Display any errors flagged as: [Emergency]
For example, to display all Error messages for the last 24 hours run:
# vxlogview -p 51216 -L -E -t 24:00:00
A query can be run to search for multiple severity levels using the command:
# vxlogview --where "((sev =ERR) || (sev = CRIT) || (sev = EMERG)) && (stdate >= '10/18/200500:00:00 AM')"
Using the -o<originator> option to display specific process logs
The originator ID is a number that matches a specific NetBackup process. Each NetBackup 6.0 daemon that uses unified logging has been assigned an originator ID. The specific originator ID can be found in the file /usr/openv/netbackup/nblog.conf on the master server. Following is a listing of some of the new originator IDs in NetBackup 6.0:
111 – Enterprise Media Manager( nbemm )
116 – NetBackup PolicyManager ( nbpem )
117 – NetBackup Job Manager ( nbjm )
118 – NetBackup Resource Broker( nbrb )
153 – NetBackup GenericJob Daemon ( nbgenjob )
For example, to view all NetBackup Policy Manager( nbpem ) log entries within the last 30 minutes run:
# vxlogview -p 51216 -o 116 -t 00:30:00
Using the -d <display> option to format the output
The “-d <display>” can be used for format the output of vxlogview . This can be appended to any vxlogview command to change the waythe log entries are displayed. Please note that not all log messages contain a value for each display option and some options will appear regardless of the display options used.
To view Job submission details for a period of time
The “–who <value>” option can be used to view Job Submission details for any jobs submitted on the server. This will search the unified logs for any entry submitted by ‘?’ which will capture job birth, death and submission details for all jobs. This will not show all the job details, it will just capture the birth, death and job submission details. This can be helpful in determining what order jobs started in and contains information like last backup time, priority and other options that determine which jobs are due to run.
For example, to show all Job submission details over the last 24 hours
# vxlogview --who'?' -t 24:00:00
Note: This option was deprecated and will not work in later versions of NetBackup.
To view unified log entries for all Products
# vxlogview -a -t 01:00:00 -d all