Transcript
Page 1: Netbackup Quick Ref Logging60

Originator IDs

Items in the tables above marked with * are a special case – where the name of the debug log directory IS NOT the same as the name of the process/daemon: The ‘admin’ debug log folder logs entries generated by NetBackup commands residing in the ‘admincmd’ folder. The txxd/txxcddaemonss write to log files in the ‘robots’ directory. The ‘vmd’ daemon writes to log files in the ‘daemon’ directory. The ‘tpcommand’ log directory contains debug log files used by ‘tpconfig’ and ‘tpautoconf’ commands.

Affects both Unified and Legacy logs

Affect Unified logs only

vxlogmgr Options

Logs Most Relevant to Backups Logs Most Relevant to Restores

Verbosity Levels

NetBackupTM 6.0 VxUL Reference Card

Setting Verbosity Levels

vnetdltidvnetd

nbgenjob

bpmountvmd *bpjobd

nbwin

bpfis

bpcd

bpbkar

Client

tpcommand *

bpcd

tlcd/tldcd *

vnetd

bpdm

bptm

bpbrm

Media Server

da

mds

nbemm

nbrb

EMM Server

admin *

nbproxy

PBX

bpcd

nbjm

bpdbm

nbpem

bprd

Master Server

vnetdltidvnetd

nbgenjob

bpmountvmd *bpjobd

nbwin

bpfis

bpcd

tar

Client

tpcommand *

bpcd

tlcd/tldcd *

vnetd

bpdm

bptm

bpbrm

Media Server

da

mds

nbemm

nbrb

EMM Server

admin *

nbproxy

PBX

bpcd

nbjm

bpdbm

nbpem

bprd

Master Server

Most Relevant

Somewhat Less

Relevant

Somewhat Less

Relevant

Most Relevant

6

5

4

3

2

1

0

CLI

No LoggingNo Logs

Finest detail: everything is logged5

Adds function entry/exits4

Adds informational dumps3

Adds progress messages2

This level adds verbose diagnostic and debug messages1

Very important low-volume diagnostic and debug messages0

Information to be loggedGUI

CLI levels set in nblog.conf file using vxlogcfg command

111 nbemm112 Default OID; not in nblog.conf116 nbpem117 nbjm118 nbrb119 bmrd and bmrdb121 bmrsavecfg122 bmrc123 bmrs124 bmrcreatefloppy.exe125 bmrcreatesrtadm126 bprprep127 bmrsetupmaster, bmrsetupboot, and pans128 bmrcleanup.exe129 bmrconfig130 bmrpkg and bmrcreatepkg131 bmrst.exe and bmrmap.exe132 nbsl134 ndmpagent137 libutil.so and libmessaging.so140 mmui142 bmrepmgt143 mds146 NOMTRS147 NOMClient148 NOMServer151 NDMP, avrd, and robotic processes153 nbgenjob157 nbnos163 nbsvcmon

Verbose Logging in nblog.conf

DescriptionExample

Display logs for specific timezone-z “GMT-6:00”-z

Display vxlogmgr version-v-v

Copy logs created in last X hours-t 12:15:00-t

Quiet mode-q-q

Gather logs for product ID-p 51216-p

Gather logs for originator ID-o 116-o

Copy logs created in last X days-n 2-n

Display command usage and help-h-h

Specify folder to copy logs to-f /usr/tmp/vxlogs-f

Copy logs created before end date-e “1/1/06 4:45:00 PM”-e

Copy logs to a folder specified by –f option

-c-c

Copy logs created after start date-b “1/1/06 9:34:00 AM”-b

Found in nblog.conf

To set the maximum logging level for all daemons run:# cd /usr/openv/netbackup/bin# ./vxlogcfg -a -p 51216 -o Default -s DebugLevel=5 -s DiagnosticLevel=5

To return to the default level of logging for all daemons run:# cd /usr/openv/netbackup/bin# ./vxlogcfg -a -p 51216 -o Default -s DebugLevel=1 -s DiagnosticLevel

To disable logging for all daemons run:# cd /usr/openv/netbackup/bin# ./vxlogcfg -a -p 51216 -o Default -s DebugLevel=0 -s DiagnosticLevel=0

After setting these options run vxlogcfg -p 51216 -o Default -l to verify the change is in place. No process restart is needed for changes to Unified Logging to take affect.

NOTE: View the DebugLevel and DiagnosticLevel entries in the nblog.conffile to see if any specific originator ID changes have been made

VxUL Filename Format

<productID>-<originatorID>-<hostID>-<date>-<rotation>.log

Page 2: Netbackup Quick Ref Logging60

Rollover Mode Examples

vxlogview Examples --where Query Options

Deleting VxUL Logs

NetBackupTM 6.0 VxUL Reference Card

--where Query Examples

View VxUL log entries for a specific job ID: vxlogview –p 51216 –X “jobid=12345”

For Multistreamed jobs use –where option to build a query

To view unified log entries for a specific start or end time: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:vxlogview -p 51216 -t 01:30:00

To display all Error messages for the last 24 hours run:vxlogview -p 51216 -L -E -t 24:00:00

Using the -o <originator> option to display nbpem logs in last 30 minutes:

vxlogview -p 51216 -o 116 -t 00:30:00

To display all output fields: vxlogview -p 51216 -t 00:15:00 -d all

To view unified log entries for all Products in last hour:

vxlogview -a -t 01:00:00 -d all

NOTE: Use these commands in combination to limit the output. Best practice is to redirect the output to a file.

Search for who logged a message.(who = '[?]')WHO or who

Search for a specific logging level (1 - 5) to display messages for.

(level = 5)

LEVEL or level

Search for the context token as string identifier.(ctx = token)CTX or ctx

Search for the message type. Valid settings for msgtype are: DEBUG, DIAG, APP, CTX or AUDIT.

(msgtype= APP)

MSGTYPE or msgtype

Search for the severity type. Valid settings for sev are INFO, WARNING, ERR, CRITorEMERG.

(sev = ERR)SEV or sev

Search for a previous time in a 'HH:MM:SS' format.

(prevtime= time)

PREVTIME or prevtime

Search for a end date in seconds or in a specific 'MM/DD/YYYY HH:MM:SS AM|PM' format.

(endate<= date)

ENDATE or endate

Search for a start date in seconds or in a specific 'MM/DD/YYYY HH:MM:SS AM|PM' format.

(stdate>= date)

STDATE or stdate

Search for the thread ID.(tid = 3)TID or tid

Search for the process ID that logged the message.

(pid = 27187)PID or pid

Search for the originator ID or the abbreviated name of the component.

(orgid = 116)

ORGID or orgid

Search for the product ID or the abbreviated name of product.

(prodid = 51216)

PRODID or prodid

DescriptionExampleField

vxlogmgr --del -p <ProductID> -o <OriginatorID> -e <enddate>The --del option will delete any matching log files. The -p <ProductID> is optional. This should be used to limit the deleting of logs to specific products, such as 51216 (NetBackup). The -o <OriginatorID> is optional. This should be used to limit the deleting of logs to specific originators, such as 116 (nbpem). The -e <enddate> is optional. This will delete any log files created before the date specified. The format for the date is 'MM/DD/YYYY hh:mm:ss AM|PM' surrounded by single quotes.

1 Search for all job submission details. This will display birth and death times for jobs as well as any job submission details for jobs created after 10/25/2005.# vxlogview --where "( who = '?' ) && (orgid = 116) && (stdate >= '10/25/2005 00:00:00 AM')"

2. Search for any log entry with a severity higher than [Info] written on or after 10/25/2005.# vxlogview --where "(sev > INFO) && (stdate >= '10/25/2005 00:00:00 AM')"

3. Search for any log entry that was generated at a diagnostic level of four or higher.# vxlogview --where "((msgtype = DIAG) && (LEVEL >= 4) && (stdate >= '10/27/05 0:0:0 AM')"

4. Search for a context value, such as multiple job Id's.# vxlogview --where "((ctx = 'jobid=1561') || (ctx = 'jobid=1562')) && (stdate >= '10/25/2005 02:00:00 PM')"

5. Search for log messages for the VxICS product that were logged between the dates 10/25/05 and 10/26/05:# vxlogview --where "(prodid = 'ics') && ((stdate >= '10/25/05 0:0:0 AM') && (endate <= '10/26/05 23:59:59 PM'))"

6. This query will retrieve log messages, which are logged before 10/27/2005 for all the installed Veritas products.# vxlogview --where "(STDATE <= '10/27/05 0:0:0 AM')"

7. This query will retrieve log messages for multiple originators for the NetBackup product.# vxlogview --where "((orgid = 116) || (orgid = 117)) && (stdate >= 10/27/05 0:0:0 AM')"

To set the RolloverMode to LocalTime

vxlogcfg -a -p 51216 -o Default -s RolloverMode=LocalTime -s RolloverAtLocalTime=00:00

To set the RolloverMode to FileSizevxlogcfg -a -p 51216 -o Default -s RolloverMode=FileSize -s MaxLogFileSizeKB=51200

To set the RolloverMode to Periodic

vxlogcfg -a -p 51216 -o Default -s RolloverMode=Periodic -s RolloverPeriodInSeconds=43200

To set the RolloverMode to Nonevxlogcfg -a -p 51216 -o Default -s RolloverMode=None

A != is used for not equal to.(orgid != 116)!=

A = is used for equal to.(pid =

14926)

=

A >= is used for greater than or equal to.(stdate >=

date)

>=

A <= is used for less than or equal to.(endate <=

date)

<=

A > is used for greater than.(sev >

INFO)

>

A < is used for less than.(level < 3)<

DescriptionExampleOperator

A double pipe is a logical OR."(sev = ERR) || (sev = CRIT)"||

A double ampersand is a logical AND.

"(orgid = 116) && (stdate >= date)"&&

DescriptionExampleOperator