17.4. System Log Files

InCenter system log files can be accessed directly by opening the folder called storage.

This folder is accessible for file transfer by using SCP or SFTP via port 22. Doing this is described further in Section 3.5, File Transfer.

Within the storage folder are the following subfolders:

Log Files

The logs folder contains the following files, which are plain text files that could be viewed using any text editor:

[Note] Note

The time and timezone used by InCenter are taken from the host operating system. This can be changed with the host operating system CLI command:

$ sudo dpkg-reconfigure tzdata

Log Files are Automatically Compressed at a Given Size

When any of the log files described above reach a certain size (by default 10 megabytes), they are automatically compressed using the GZIP algorithm and the file is renamed. The new name of the compressed file takes the form <type>.nn.gz, where <type> is one of system, audit and debug and nn is a unique sequential number assigned to each compressed file.

For example, the last compressed audit.log will get the name audit.log.0.gz. The lowest numbered file is always the latest, with all existing compressed files having their number incremented when a new one is generated. After compression takes place, subsequent log messages are placed in a new file with the original uncompressed name (in the case of audit files, audit.log).

Any of the compressed files can be uncompressed using a suitable GZIP utility.

There is a Maximum Number of Log Files

To ensure that log files do not take up too much space, there is a maximum number of compressed log files which can exist. By default, this is set at 10. In other words, a maximum of 10 rotated GZIP files can exist at once with one of the digits from 0 to 9 in their filename. Those 10 will be in addition to the current uncompressed .log file.

When there are 10 compressed log files and the current file reaches the size limit, the oldest compressed file is deleted to make way for the new compressed file.

Changing Maximum Size and Maximum Number

The maximum uncompressed log file size can be set to an administrator defined value through the InCenter CLI. For example, the following command will set the maximum size to 5 megabytes:

admin@InCenter:/> cc Settings 
admin@InCenter:/Settings> set LogFiles MaxFileSize=5

Similarly, the maximum number of compressed log files stored could be set to 20:

admin@InCenter:/Settings> set LogFiles NumberOfFiles=20

The mgmtsystem Service Logging

In addition to the log files described above, there is additional logging information saved in the Linux systemd journaling system. Its purpose is to record any critical system events when InCenter is unable to start at all. Normally the administrator will not use the information in this location. To see the logging information use the following command:

> journalctl -u mgmtsystem

This command will show a paged listing of the latest log record. To exit the view, press the Q key or enter Ctrl-C.