Log Level Definitions

SUMMARY

An explanation of the different log levels on Unitrends appliances and how to validate settings.

ISSUE

  • What do the log levels mean and how do I know what log levels should be configured?
  • Having a higher than normal log level set may lead to the /usr/bp disk partition becoming full.
  • Certain conditions may cause repeated log messages that are not appropriate for the given log level and the software itself needs to be adjusted.

There are a variety of Unitrends logs contained in the /usr/bp/logs.dir directory, and they have debugging log levels defined in the /usr/bp/bpinit/master.ini configuration file in the debugging section. 

Debugging Log Levels

Level

Alt level

Meaning

0

100

Critical error messages, aborts the subsystem

1

101

Major error messages, some lost functionality

2

102

Warning error messages which do not cause a functional failure

3

103

Informational messages, showing completion, progress, etc.

4

104

Debug messages, to help in diagnosing a problem

5

105

Trace messages (enter/exit subroutine, buffer contents, etc.)

The Unitrends logging by default uses a custom libss method to manage log files. This uses the above log tunables to decide when to start writing to a new log file and how many logs to keep. The log levels 0-5 are using the libss method. The advantage of this method is that if a log is growing rapidly, it will also rotate rapidly. The disadvantage of this method is that each new process starts a new log file, so if the log is small, it can end up with many small log files.

The standard way to manage the size of log files in Linux is the logrotate mechanism, which is automatically invoked for all logs under /var/log. This can be used for some Unitrends logs in /usr/bp/logs.dir, if the log level is specified as 100-105 (‘Alt level’ above), also called ‘logsimple’ because it writes all log messages to a single file until logrotate occurs.  There is a configuration file to include these logs in logrotate, called /etc/logrotate.d/unitrends.

Please note, though most log levels are defaulted to level 0, this is not true for all logs, and some processes shoudl be set by default to higher levels. See below in the notes section for a list of the logs that use non-zero default levels.  

Configurable Log Settings

The following settings are available in /usr/bp/bpinit/master.ini:
 

[LogRetentionDays]        ; Max # of days the logs will be retained
default=21                ; add field appname=value to override default setting for the app

[LogRetentionInstances]   ; Max # of instance logs to retain
default=20                ; An instance's log is retained if it is < LogRetentionDays old
                          ; OR the instance # is within MaxInstanceLogsRetention
                          ; value 0 is ignored

[LogsPerInstance]         ; No. of log files maintained for each instance
default=3                 ; value 0 or 1 sets files size limit as unlimited (same as MaxLogKB=0)

[MaxLogKB]                ; Size of each log file in KB
default=10240             ; value 0 sets files size to unlimited

RESOLUTION

Under normal conditions, it is recommended to leave the log level at the default setting of 3 or less. The web_gui and bputil logs default to 100 (Alt level).

If the log levels are set too high, it may consume too much space on the /usr/bp disk partition.

Verify Whether the Log Levels are Set Correctly

Use /usr/bp/bin/check_logging to determine if the system is set to debug log levels. It will show which log parameters are set to debug levels. 

Normal command output:

# /usr/bp/bin/check_logging
Checking /usr/bp/bpinit/master.ini ...
Max Log size = 33792000 KB
/usr/bp size = 68849048 KB
OK

Indication of an error:

# /usr/bp/bin/check_logging
Checking /usr/bp/bpinit/master.ini ...
bpserver=5 # WARNING: DEBUG LOG LEVEL
updatedb=5 # WARNING: DEBUG LOG LEVEL
autosynth=5 # WARNING: DEBUG LOG LEVEL
===ERROR: Log parameters are out of bounds for /usr/bp
Number of Log sources=55
LogRetentionInstances=100
LogsPerInstance=200
MaxLogKB=10240
Max Log size = 11264000000 KB
/usr/bp size = 68849048 KB
===ERROR===

NOTES

The following list are the unitrends applications that have a default log level higher than 0.  It is recommended this be the minimum log value used for the following processes:

[debugging]
bpserver=3
restore_client=3
alertman=1 
web_gui=100
bputil=100
profileHelper=3
profile_migrate=5
uarchive=2
autosynth=2
inlineHashdb=2
restore_daemon=2
applianceAgent=2
cloudadm=1
inventory_sync=3
ndmjob=4
replica_daemon=103

All other noted logs in this section shoudl be default = 0.  lowering the above logs to less than the indicated number can result in difficulty in troubleshooting common issues.  

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section