5.6 Working with Log Files

5.6.1 Understanding Log Files

The Mobility Service components generate a set of log files that are created in subdirectories under the following directory:

/var/log/datasync

The log file subdirectories under /var/log/datasync and the log file names are as follows:

Internal Mobility Service Component

Log File Subdirectory under /var/log/datasync

Log File Name

Sync Engine

syncengine

engine.log

Config Engine

configengine

configengine.log

Web Admin

webadmin

server.log

Connector Manager

syncengine

connectorManager.log

Sync Agents

connectors

  • groupwise-agent.log
  • groupwise.log
  • mobility-agent.log
  • mobility.log

Use the following command to check the most recent additions to a log file:

tail -f log_file_name.log

5.6.2 Setting the Log Level

All Mobility log files use the same log level, which you set on the General page in the Mobility Admin console.

  1. In the Mobility Admin console, click Service Configuration Service Configuration icon.

  2. In the Log Level field, select from the following log levels:

    Log Level field
    • Info: Logs informational messages about normal synchronization processing. This log level is suitable for a Mobility administrator who wants to observe the functioning of the Mobility system.

      Info is the default log level and is strongly recommended because it balances the amount of data logged, the amount of disk space required for log files, and the load on the Mobility system.

    • Debug: Logs large quantities of developer-level data. This log level is appropriate for troubleshooting purposes. It puts a heavy load on the Mobility system and should be used only until the troubleshooting activities are completed.

    • Warning: Logs problems that should not adversely affect synchronization processing but should be investigated and resolved for optimum performance. This log level can be appropriate for a smoothly running Mobility system where you only want to be notified of warnings and errors.

    • Error: Logs error messages that indicate critical problems in synchronization processing. This log level puts the least load on the Mobility system because it logs only critical errors, but it does not log sufficient data to help resolve any errors that occur.

  3. Click Save to save the new setting(s).

  4. Restart the Mobility Service to put the new setting(s) into effect:

    rcgms restart
    

HINT:The user interface instructs you to restart the Mobility Service, because this is required for all other settings on this page. However, if you only change the log level, you do not need to restart the Mobility Service. The sync agents immediately put the new log level into effect.

5.6.3 Configuring Log File Rotation

The Mobility log files are automatically compressed and rotated by a logrotate cron job. The schedule is set by the DAILY_TIME="00:30" line in the /etc/sysconfig/cron file, which means that the log files are checked at 12:30 a.m. each night. Any Mobility log files that have exceeded 4 MB in size are compressed and rotated at that time. After 30 days or 99 instances of each log file have accumulated, the oldest log file is deleted when a new log file is created.

Log rotation is controlled by the following files:

/etc/logrotate.d/datasync-syncengine
/etc/logrotate.d/datasync-configengine
/etc/logrotate.d/datasync-webadmin
/etc/logrotate.d/datasync-monitorengine

By default, gzip is used to compress old log files. You can change the compression method by changing the following line in the files listed above:

compresscmd /usr/bin/gzip

For example, to change from gzip compression to bz2 compression, use the following line:

compresscmd /usr/bin/bzip2 

Using bz2 compression produces smaller log files but uses more system resources during compression.

For more information, see the Linux logrotate command.

5.6.4 Gathering Log Files for Novell Technical Services

The supportconfig tool provided by Novell Technical Services gathers information about your Mobility system to help them resolve issues with which you require assistance. It is provided as part of the SUSE Linux Enterprise Server 11 operating system. You can also use it for your own troubleshooting activities.

Each component of your Mobility system (sync agents, engines, and so on) has a supportconfig plug-in that gathers information specific to its functioning. The following information is gathered:

  • The component’s configuration file with security information, such as passwords, stripped out

  • The component’s current log file

  • The component-specific script that supportconfig ran to collect the information

To run supportconfig for your own troubleshooting activities:

  1. In a terminal window on the Mobility server, become root by entering su - and the root password.

  2. Enter the following command:

    supportconfig
    

    The supportconfig tool examines the server very thoroughly and lists its findings. The tool then zips all the data it collected into the following file:

    /var/log/nts_servername_yymmdd_hhss.tbz
    

    This file name identifies the server and the time stamp for the files that supportconfig has collected.

  3. Examine the files that supportconfig collected:

    1. Copy the .tbz file to a convenient temporary directory.

    2. Use the following command to unzip the compressed file into the set of text files that hold the findings produced by the supportconfig tool:

      tar xjf file_name.tzb
      
  4. View each .txt file to see the configuration file, current log file, and script file for each Mobility component.

For more information, see supportconfig for Linux.