Examples of using vxlogcfg to configure unified logs
Use the vxlogcfg command to change logging levels and rollover settings.
The vxlogcfg command has the following characteristics:
The vxlogcfg command is the only way to turn off diagnostic and debug messages in unified logging. In legacy logging, the writing of messages cannot be turned off, only minimized.
The vxlogcfg options for robust file logging (MaxLogFileSizeKB and NumberOfLogFiles) also affect certain legacy logs in the pre-7.7 versions of NetBackup.
See About limiting the size and the retention of legacy logs.
Absolute paths must be specified. Do not use relative paths.
The following examples show how to use the vxlogcfg command to configure unified logging settings.
Table: Example uses of the vxlogcfg command
Item | Example |
---|
Set the maximum log file size | By default, the maximum log file size in unified logging is 51200 KB. When a log file reaches 51200 KB, the file closes and a new log file opens.
You can change the maximum file size with the MaxLogFileSizeKB option. The following command changes the default maximum log size to 100000 KB for the NetBackup product:
# vxlogcfg -a -p 51216 -o Default -s
MaxLogFileSizeKB=100000 For MaxLogFileSizeKB to be effective, the RolloverMode option must be set to FileSize:
# vxlogcfg -a --prodid 51216 --orgid Default -s
RolloverMode=FileSize MaxLogFileSizeKB can be set per originator. An originator that is not configured uses the default value. The following example overrides the default value for service nbrb (originator 118).
# vxlogcfg -a -p 51216 -o nbrb -s
MaxLogFileSizeKB=1024000 |
Set log recycling | The following example sets automatic log file deletion for nbemm logs (originator ID 111):
# vxlogcfg -a --prodid 51216 --orgid 111 -s
RolloverMode=FileSize MaxLogFileSizeKB=512000
NumberOfLogFiles=999 LogRecycle=TRUE This example sets nbemm rollover mode to file size, and turns on log recycling. When the number of log files exceeds 999, the oldest log file is deleted. EXAMPLE 5 shows how to control the number of log files. |
Set debug level and diagnostic level | The following example sets the default debug level and diagnostic level of product ID NetBackup (51216):
# vxlogcfg -a --prodid 51216 --orgid Default -s
DebugLevel=1 DiagnosticLevel=6 |
List the unified logging settings | The following vxlogcfg example shows how to list the active unified logging settings for a given originator (the nbrb service). Note that MaxLogFileSizeKB, NumberOfLogFiles, and RolloverMode are included in the output.
# vxlogcfg -l -o nbrb -p NB Configuration settings for originator 118,
of product 51,216...
LogDirectory = /usr/openv/logs/nbrb/
DebugLevel = 1
DiagnosticLevel = 6
DynaReloadInSec = 0
LogToStdout = False
LogToStderr = False
LogToOslog = False
RolloverMode = FileSize | LocalTime
LogRecycle = False
MaxLogFileSizeKB = 51200
RolloverPeriodInSeconds = 43200
RolloverAtLocalTime = 0:00
NumberOfLogFiles = 3
OIDNames = nbrb
AppMsgLogging = ON
L10nLib = /usr/openv/lib/libvxexticu
L10nResource = nbrb
L10nResourceDir = /usr/openv/resources
SyslogIdent = VRTS-NB
SyslogOpt = 0
SyslogFacility = LOG_LOCAL5
LogFilePermissions = 664
|
A complete description of vxlogcfg is in the NetBackup Commands Reference Guide.