Working with Log Files > About Debugging APTARE IT Analytics
  
Version 10.3.00P13
About Debugging APTARE IT Analytics
APTARE IT Analytics logs exceptions. Often these exceptions do not indicate a problem with APTARE IT Analytics. However, if you experience system problems, Veritas Support wants to help you troubleshoot your problem and interpret information in the log files. To speed up troubleshooting, provide the Veritas Support with the appropriate log files. These log files are often specific to your operating system.
Log files are managed by a logging subsystem, which manages log file size and rolls and deletes old files. Log files are used only for audit trail or troubleshooting purposes and can be safely deleted.
Note: When the portal/receiver or collector is upgraded, the logging configuration will be reset to the default values.
Turn on Debugging
When you turn on debugging, additional entries are logged to provide troubleshooting details.
1. In the Portal, within a report window, enter the following key combination:
Ctrl+Alt+D
This turns on debugging for the current report and it logs messages to both of the following log files:
Linux: /tmp/scon.log and /opt/tomcat/logs/portal.log
Windows: C:\tmp\scon.log and C:\opt\tomcat\logs\portal.log
2. See also Portal Log Files and Database Log Files.
Database Logging
The /tmp/scon.log file (on Linux systems) or C:\opt\oracle\logs\scon.log (on Windows systems) contains a database audit trail and troubleshooting messages. You can control database logging by editing the following file, which contains instructions on what to modify in the file.
Linux: /opt/aptare/database/stored_procedures/config.sql
Windows: C:\opt\oracle\database\stored_procedures\config.sql
Portal and Data Collector Log Files - Reduce Logging
To manage the maximum file size and threshold parameter, edit the file:
Linux: /opt/aptare/mbs/conf/systemlogger.xml
Windows: C:\opt\aptare\mbs\conf\systemlogger.xml
<param name="MaxFileSize" value="10MB" />
<param name="MaxBackupIndex" value="10" />
<!--The Threshold param can either be debug/info/warn/error/fatal.-->
<param name="Threshold" value="debug"/>
Portal Log Files
For Portal Tomcat, edit this file:
Linux: /opt/aptare/portalconf/systemlogger.xml
Windows: C:\opt\aptare\portalconf\systemlogger.xml
<param name="MaxFileSize" value="10MB" />
<param name="MaxBackupIndex" value="10" />
 
For the Data Receiver Tomcat, edit this file:
Linux: /opt/aptare/datarcvrconf/systemlogger.xml
Windows: C:\opt\aptare\datarcvrconf\systemlogger.xml
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>/opt/tomcat/logs/datarcvr_%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="com.aptare.dc.util.LogbackSizeBasedTriggeringPolicy">
<maxFileSize>20MB</maxFileSize>
</triggeringPolicy>
<!--The Threshold param can either be debug/info/warn/error/fatal.-->
<param name="Threshold" value="debug"/>
 
Data Collector Log Files
For the Data Collector the file:
Linux: /opt/aptare/mbs/conf/metadatalogger.xml
Windows: C:\Program Files\Aptare\mbs\conf\metadatalogger.xml
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>/opt/aptare/agent_version/DemoDC/mbs/logs/metadata${mdc_key}.%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>20</maxIndex>
</rollingPolicy>
<triggeringPolicy class="com.aptare.dc.util.LogbackSizeBasedTriggeringPolicy">
<maxFileSize>50MB</maxFileSize>
</triggeringPolicy>
Database SCON Logging - Reduce Logging
To minimize output to the scon.log file, you can prune the content using this procedure:
1. Edit the config.sql file.
Linux: /opt/aptare/database/stored_procedures/config.sql
Windows: C:\opt\oracle\database\stored_procedures\config.sql
2. Change the output setting to LOW, as shown in red in the following example.
set Echo Off
set Feedback Off
 
CREATE OR REPLACE PACKAGE config AS
-- Valid APTARE IT Analytics Logging levels are as follows:
-- constant.DEBUG_OFF
-- constant.DEBUG_LOW
-- constant.DEBUG_MEDIUM
-- constant.DEBUG_HIGH
 
-- To change the global APTARE IT Analytics logging level, change the following constant
globalDebugLevel PLS_INTEGER := constant.DEBUG_LOW;
 
reportTransLongerThan FLOAT := 0.85; -- Transactions that take longer than this number of seconds will be reported in aptare-trans.log
-- The following directory will be used to store the APTARE IT Analytics
-- database logfiles scon.log and scon.err. On a Windows portal server,
-- this will default to C:\opt\oracle\logs
LOGDIRECTORY CONSTANT VARCHAR2(64) := '/tmp' ;
END config;
/
SHOW ERRORS;
3. Apply and validate new settings with the following utilities:
Linux:
sqlplus portal/<portal_password>@/opt/aptare/database/stored_procedures/config.sql
sqlplus portal/<portal_password>@/opt/aptare/database/tools/validate_sp
Windows:
sqlplus portal/<portal_password>@C:\opt\oracle\database\stored_procedures\config.sql
sqlplus portal/<portal_password>@C:\opt\oracle\database\tools\validate_sp
Refreshing the Database SCON Log
Even when the amount of data written to the scon.log file is minimal, over time this file can reach a limit that causes processing to cease. The following instructions provide the steps for a utility that copies the existing log file and then empties scon.log, without impacting APTARE IT Analytics processing.
The utility to refresh scon.log executes automatically according to the following rules:
Utility executes monthly to refresh the scon.log file
First run executes 30 days after portal installation
Production run is scheduled for the first Tuesday of every month
The utility searches for the following directory paths until an scon.log file is found:
'C:\opt\oracle\logs','C:\opt\aptare\oracle\logs','C:\opt\aptare\oracle\log','/tmp'
To refresh the scon.log file, use the following utility:
1. Log in to SQLPLUS, as shown below.
Linux & Windows:
sqlplus portal/<portal_password>
2. Execute the log cleanup utility,
Linux & Windows:
exec logfile_cleanup_pkg.cleanupLog('Y','Y');
Two parameters are required, as described in the following table:
Backup Flag
Save in Backup File
Description
Y
Y
scon.log file emptied
backup in scon_<month>.log file
Y
N
scon.log file emptied
backup in scon1.log file; all backups will overwrite scon1.log
N
Y
scon.log file emptied
no backup of the scon.log file
N
N
scon.log file emptied
no backup of the scon.log file
NOTE: This utility is intended to be run no more than once a month. If you plan to run it more than once in a month, be aware of the naming convention for the backup scon.log file, as shown with the parameters in the above table.