Amarisoft

Log options in Configuration File

 

This page is not about testing anything. This is more of information purpose. It is about how to find or set various configuration in configuration file. I personally recommend to use WebGUI whenever allowed, but there would be some cases where you may need or want to collect or configure logging within configuration files. In the configuration file (e.g, enb configuration, mme configuration files), you can configure followings about the logging

 

 

Table of Contents

 

 

Where is Log Files

 

The logs being collected while the callbox is running are located in /tmp directory by default. You can change the location of the default directory in configuration file if you want.

Info log config location 01

 

When the callbox is stopped, the captured the log is automatically backed up /var/log/lte directory by default. You can enable or disable this automatic backup in ots configuration file if you want.

Info log config location 02

 

 

 

Log Information and Settings in Configuration Files

 

eNB/gNB log

 

If you open up enb configuration file (e.g, enb-xyz.cfg, gnb-xyz.cfg) as shown below.  By default the eNB / gNB configurations are located in /root/enb/config directory.

The part in blue are the one you need to pay attention to. Offical document for these parameters and syntax are described in enb document.

  /* Log filter: syntax: layer.field=value[,...]

  

     Possible layers are phy, mac, rlc, pdcp, rrc, nas, s1ap, x2ap, gtpu and

     all. The 'all' layer is used to address all the layers at the

     same time.

 

     field values:

 

     - 'level': the log level of each layer can be set to 'none',

     'error', 'info' or 'debug'. Use 'debug' to log all the messages.

     

     - 'max_size': set the maximum size of the hex dump. 0 means no

       hex dump. -1 means no limit.

  */

  //log_options: "all.level=debug,all.max_size=32",

  log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1",

  log_filename: "/tmp/enb0.log",

Most important parameter is 'log_options'.  If you use WebGUI, you can configure all the details of configuration on the property setting dialog box as shown here.  If you are in a situation where you cannot or do not want to use WebGUI, you can configure log options in configuration file as shown here. The most common case is to collect the full log (fullstack log) or limited log.

 

Full Stack log

When you want to collect the full stack log (full log), configure the log option as follows.

  log_options: "all.level=debug,all.max_size=32",

 

Full Stack log and Additional Information

When you want to collect the full stack log (full log) and additional info (e.g, bcch, IQ, csi decode etc), configure the log option as follows. (NOTE : you don't have to add all of these additional configuration. Just add whatever you want to add)

  log_options: "all.level=debug,all.max_size=32, phy.csi=1, bcch=1, mib=1, phy.signal=1",

 

Log with limited Information

It is always recommended to collect the full log, but there would be cases where you want to limit the amount of information in the log for various reasons (e.g,  . (NOTE : you don't have to limit the information for every layers. Just put the limitation to whatever you want)

log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1",

 

 

 

MME log

 

If you open up mme configuration file (e.g, mme-xyz.cfg, mme-xyz.cfg) as shown below.  By default the configuration files are located in /root/enb/config directory.

The part in blue are the one you need to pay attention to. Offical document for these parameters and syntax are described in mme document.

  /* Log filter: syntax: layer.field=value[,...]

 

     Possible layers are nas, ip, s1ap, gtpu and all. The 'all' layer

     is used to address all the layers at the same time.

 

     field values:

 

     - 'level': the log level of each layer can be set to 'none',

     'error', 'info' or 'debug'. Use 'debug' to log all the messages.

 

     - 'max_size': set the maximum size of the hex dump. 0 means no

       hex dump. -1 means no limit.

  */

  //log_options: "all.level=debug,all.max_size=32",

  log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,ngap.level=debug,ngap.max_size=1",

  log_filename: "/tmp/mme.log"

Most important parameter is 'log_options'.  If you use WebGUI, you can configure all the details of configuration on the property setting dialog box as shown here.  If you are in a situation where you cannot or do not want to use WebGUI, you can configure log options in configuration file as shown here. The most common case is to collect the full log (fullstack log) or limited log.

 

Full Stack log

When you want to collect the full stack log (full log), configure the log option as follows.

  log_options: "all.level=debug,all.max_size=32",

 

Log with limited Information

It is always recommended to collect the full log, but there would be cases where you want to limit the amount of information in the log for various reasons (e.g,  . (NOTE : you don't have to limit the information for every layers. Just put the limitation to whatever you want)

log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,ngap.level=debug,ngap.max_size=1",

 

 

Global Settings for log

By Global Setting, I mean the properties that affects the whole log files (e.g, enb0.log, mme.log etc) not for a specific component within the file. These settings are configured in ots.cfg located in the directory /root/ots/config as shown below.

# Logs

LOG_FILE="ots.log"

LOG_FILE_SIZE="1M" # Service log file size threshold for rotation

LOG_SIZE="250M" # Components log file size threshold for rotation

LOG_PATH="/var/log/lte/" # Log rotation target path

LOG_PERSISTENT_SIZE="5G" # Maximum size of logs to store in LOG_PATH (if no unit KBytes assumed)

LOG_PERSISTENT_COUNT="2000" # Maximum number of log file to keep in LOG_PATH

LOG_GZIP="0" # Set to positive value to compress logs in LOG_PATH

LOG_POLL_DELAY="10"

LOG_BACKUP_ON_STOP="y" # Set it to n to avoid log backup (to LOG_PATH) on component stop

Basically this configuration applies not only to ots log but also to all the component log (i.e, enb / gnb log, mme log etc).  

 

 

 

Log Configuration Settings in Screen Mode (Command Line Interface)

 

You can enable or disable a specific logging or change the log level on the fly within screen mode (command line interface) as shown below. This is convenient because you can collect a specific log only when you want and disable it afterward.

 

Info log config seeting in screen 01

 

Info log config seeting in screen 02

 

Info log config seeting in screen 03