Examples of using vxlogcfg to configure unified logs
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 ID 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 the nbemm logging 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 = 600
|