Salesforce

Script to help manage PASOE log sizes when extended logging is enabled

« Go Back

Information

 
TitleScript to help manage PASOE log sizes when extended logging is enabled
URL Namescript-to-help-manage-pasoe-log-sizes-when-extended-logging-is-enabled
Article Number000168339
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: Linux
Other: PASOE
Question/Problem Description
How to manage PASOE log files when enabling extended logging?
How to manage Progress OpenEdge AppServer log files when using 4GLTrace?
What can be done to manage the size of AppServer log files?
How to capture specific error numbers, or messages in a PASOE log file when debugging an issue?
How to manage PASOE log file sizes when debugging an issue?
Is there a way to search for errors or keywords in a PASOE log file and capture the output?
Need to turn on 4GLTrace to debug an issue but concerned with PASOE log file growth.
Can anything be done to reduce the size of PASOE log files when enabling logginglevel 2 or greater.?
 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
Note: This information does NOT apply to the classic Appserver. 

The purpose of this Linux script is to help manage PASOE instance log file sizes when troubleshooting a problem and extended logging needs to be enabled which can result in very large files.  The script aims to parse the logs every X amount of time, copy the logs that has errors, and clean the logs afterwards.

The script can be configured to run every X amount of time as long as the lock file exists.

Every time the script runs it will scan the logs looking for errors and/or keywords specified.

If the keywords are found in the logs, the script will place the files inside a tar.gz file and runs tcman clean on the instances to reset the size of the logs.

Explanation of the variables in the script and examples for the values:
 
#Name of the instances to be monitored, each name separated with a space.
PAS_INSTANCES = "oepas1 oepas2 oepas3"

#The root directory of all instances.
CAT_BASE = /usr/wrk

#The directory where tar.gz files should be created
TARGET_DIR = /tmp

# Place where the lock file should be created.
SCRIPT_LOCK = /tmp/PASOE_log_monitor.lk

#Time in seconds between each iteration of the script, 3600 seconds is an hour.
WAIT_IN_SECS = 3600
 
#Terms / key words to be searched in the logs.
GREP_KW = "error\|exception\|fail\|died\|terminated\|shutdown\|restarted\|Starting\|(14438)\|(15353)\|(15358)\|ccConvertBytes"

The script needs to be customized based on the errors, specific keywords, or information your interested in capturing.  

Leave the variable SCRIPT_LOCK at the default values. If necessary change the path of the lock file but keep the same name for the file.
Workaround
 
Notes
The only files that would need to be sent to tech support would be the compressed tar balls created by the script. 
The script can be modified/customized to work on other operating systems and shell interpreters. 
Keyword Phrase
Last Modified Date3/24/2020 5:00 PM

Powered by