Cleaning up the XCOM.LOG file
search cancel

Cleaning up the XCOM.LOG file

book

Article ID: 14004

calendar_today

Updated On:

Products

XCOM Data Transport XCOM Data Transport - Windows XCOM Data Transport - Linux PC

Issue/Introduction

How to manage (purge) the XCOM.LOG file for XCOM for Windows.

Environment

  • XCOM™ Data Transport® for Windows
  • XCOM™ Data Transport® for UNIX/Linux PC

Resolution

Sample settings of the XLOGFILE parameter in xcom.gbl:

XLOGFILE=$XCOM_HOME/xcom.log

XLOGFILE=/opt/CA/XCOM/xcom.log

XLOGFILE=$XCOM_HOME/xcom.$(date +"%F").log

XLOGFILE=/opt/CA/XCOM /xcom.$(date +"%F").log

Please check that there aren’t any active transfers is to use a repetitive UNIX Schedular like or cron job to rename the current xcom.log file.

For example:

  1. xcomd –s
  2. mv $XCOM_HOME/xcom.log $XCOM_HOME/xcom. $(date +"%F").log
  3. xcomd 

Addtionally you can use the XCOMLOG utility to clear out old messages:

Purge the Log File

CLEANLOG purges entries from the xcom.log. Run this program on a regular basis to ensure that the log file does not grow too large. Back up the XCOM.LOG before running this program as all items older than the specified age are deleted.

Note: XCOM should be idle when you run this program.

Syntax

The syntax for CLEANLOG is as follows:

  • CLEANLOG number_of_days_old [log_file_name]
  • number_of_days_old
    Entries in the log longer than the number of days specified are purged.
  • log_file_name 
    The name of the log file to clean (optional). The default is the XCOM.LOG file in the current directory. If not specified, the log file name defaults to $XCOM_HOME/xcom.log where $XCOM_HOME is an environment variable.

Example

CLEANLOG 5

This command removes entries in XCOM.LOG that are older than five days.