Netbackup VxLog Configurations

Verify current configurations of the Veritas Unified Logs (VxLog)
bash-3.00# /usr/openv/netbackup/bin/vxlogcfg -p 51216 -o Default -l
Configuration settings for originator 112, of product 51216...
LogDirectory = /usr/openv/logs/
DebugLevel = 1
DiagnosticLevel = 1
DynaReloadInSec = 0
LogToStdout = False
LogToStderr = False
LogToOslog = False
RolloverMode = LocalTime
LogRecycle = True
MaxLogFileSizeKB = 51200
RolloverPeriodInSeconds = 43200
RolloverAtLocalTime = 0:01
NumberOfLogFiles = 14
OIDNames =
L10nLib = /usr/openv/lib/libvxexticu.so.1
L10nResourceDir = /usr/openv/resources
SyslogIdent = VRTS-NB
SyslogOpt = 0
SyslogFacility = LOG_LOCAL5
LogFilePermissions = 664
Set the maximum logging level for all daemons run:

/usr/openv/netbackup/bin/vxlogcfg -a -p 51216 -o Default -s DebugLevel=5 -s DiagnosticLevel=5

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

Disable logging for all daemons run:
/usr/openv/netbackup/bin/vxlogcfg -a -p 51216 -o Default -s DebugLevel=1 -s DiagnosticLevel=0

Verify it again:
/usr/openv/netbackup/bin/vxlogcfg -p 51216 -o Default -l


Recycling unified log files
/usr/openv/netbackup/bin/vxlogcfg -a -p 51216 -o Default -s LogRecycle=true

Configure the NumberOfLogFiles setting.  The following example will keep 14 days worth of logs when using vxlogmgr to delete log files
/usr/openv/netbackup/bin/vxlogcfg -a -p 51216 -o Default -s NumberOfLogFiles=14

Manually delete unified log files (this will delete vxlog based on NumberofLogFiles setting) if older than that:
/usr/openv/netbackup/bin/vxlogcfg vxlogmgr -a –d
Manually delete unified log files based on criteria , date or originator ID:
Delete all Unified log files created before midnight on 10/20/2010:
# vxlogmgr --del -e '10/20/2010 00:00:00 AM'
The following command will delete all Unified log files for the NetBackup product created on and before 10/20/2010.
# vxlogmgr --del -p 51216 -e '10/20/2005 23:59:59 PM'
The following command will delete all Unified log files for the NetBackup nbpem daemon created before 1PM on 10/20/2010.
# vxlogmgr --del -p 51216 -o 116 -e '10/20/2010 01:00:00 PM'

Directories used with Unified Logging
The /usr/openv/logs directory on the Master/EMM server stores log files.  Unlike Legacy logging, no directories need to be created for Unified logging to take effect.  By default logging is enabled at the lowest level and can be adjusted as needed using the vxlogcfg command.  

The format for the file names stores in the /usr/openv/logs directory is as follows:
----.log

The for NetBackup is 51216.  A list of Product Id's can be found in the /etc/vx/vrtslog.conf file.
The will indicate what process the log is for.  A list of Originator Id's can be found in the /usr/openv/netbackup/nblog.conf file.
The indicates the host ID of the machine.
The indicates the date of the log and is in YYMMDD format.
The is used to rotate the logs to control log size and disk space usage.
Example:
bash-3.00# ls -lrth
total 80924220
drwxr-xr-x   2 root     root          96 Aug 20  2010 lost+found
-rw-rw-r--   1 root     root        5.2K Apr  2 22:44 51216-166-2234025388-110402-0000000000.log
-rw-rw-r--   1 root     root        153M Apr  3 23:46 51216-226-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root         12M Apr  4 00:00 51216-116-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root        1.6M Apr  4 00:00 51216-222-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root         48M Apr  4 00:00 51216-272-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root        332M Apr  4 00:00 51216-132-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root        387M Apr  4 00:00 51216-117-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root        340M Apr  4 00:00 51216-118-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root        2.1G Apr  4 00:00 51216-111-2234025388-110403-0000000000.log
-rw-rw-r--   1 root     root        235M Apr  4 23:55 51216-226-2234025388-110404-0000000000.log
-rw-rw-r--   1 root     root         13M Apr  4 23:59 51216-116-2234025388-110404-0000000000.log

Commands used with Unified Logging
There are three primary commands used with Unified logging.  These are:
vxlogview - This command is used to view the Unified log files.  The vxlogview command allows the administrator to search by process (also known as an originator), Job ID, timeframe, etc. to display only the log entries needed to help isolate a problem.
·     vxlogcfg - This command is used to configure Unified logging settings such as how many days to keep logs, when to rotate log files as well as other settings.
·     vxlogmgr - This command is used to manage Unified log files and can be used to move or delete logs.  This can also be used to upload logs to a directory which can then be sent to Symantec Enterprise Technical Support for analysis.

0 comments: