Running Business Processes and Composite Applications 10.4 | Running Business Processes and Composite Applications | Diagnosing My webMethods Server | Using My webMethods Server Command Line Tools | loganalyzer
 
loganalyzer
Description
Identifies and analyzes the reported issues found in XML log files, then organizes the results into reports displayed in the console window. The My webMethods Server loganalyzer command stores the results as plain text in the diagnostics.log file.
You can set loganalyzer command options to produce the following reports file:
*productEvent.xml. Reports the name of products that caused events reports in the logs.
*loggerEvent.xml. Reports the names of components that caused the event reports in the logs.
*logLevel.xml. Reports a summary of all available events found in the logs.
*messageBased.xml. Reports a summary of the issues with common message texts found in the logs.
*componentEvent.xml. Reports the Java artifacts such as jars, portlets, or web applications that caused the events found in the log.
To correctly identify the component or product causing the error, the loganalyzer command uses the stack trace, when available, or the logger element. The stack trace and logger element are part of the issue details reported with fatal issues in the errors.log.
The loganalyzer command parses the stack trace or logger to find the corresponding component and product mapped in the javaArtifactMapping.xml file. For more information, see Java Artifact Mapping in My webMethods Server .
The loganalyzer command is located in the following directory:
Software AG_directory /MWS/tools/diagnostics/bin
Syntax
*On Windows: loganalyzer.bat logFile [options]
*On UNIX./loganalyzer logFile[options]
Options
[{-f | --from} {yyyy.MM.dd HH:mm:ss | nd | nH}]
[{-t | --from-date} {yyyy.MM.dd
HH:mm:ss
| nd | nH}]
[{-i | --similarity} integer]
[{-j | --javaArtifactMapping} directory_and_file_name]
[{-s | --server} server_instance]
[{-a | --action} {all | frequency | severity | component | product
| logger}]
[{-e | --severity} {DEBUG | ERROR |INFO | FATAL | WARN }]
[{-x | --xml}]
[{-o | --output} directory_name]
The following table lists the arguments and options of the loganalyzer command-line tool:
Arguments and Options
Description
logfile
Specifies the full directory path and name of the log file to analyze, or specifies a directory that contains the errors.log file.
When you provide a directory without specifying a filename, the loganalyzer command searches for a log file by checking the subdirectories for file names matching the following:
*errors.log
*errors.xml
*errors
The loganalyzer command scans the first file matching the file name criteria for warn, error, and fatal events that are generated by My webMethods Server.
{-f | --from-date}
Specifies the date from which to start analyzing the selected log file. Use yyyy.MM.dd HH:mm:ss format for the date or use days (d) or hours (h), for example, 2d or 3h. This captures information from the logs that occurred within the specified time period (or, for example, the logs that have been modified in the last 3 hours). The default value is 1970.01.01 02:00:00.
{-t | --to-date}
Specifies the date to stop analyzing the selected log file. Use yyyy.MM.dd HH:mm:ss format for the date or use days (d) or hours (h), for example, 2d or 3h. This captures information from the logs that occurred prior to the specified date (or, for example, logs that have been modified up until 3 hours ago). The default value is 1970.01.01 02:00:00.
{-i |--similarity}
Specifies a percentage for the similarity level by which log messages are considered equal or dissimilar.
{-j | --javaArtifactMapping}
Specifies the full path to the directory of the javaArtifactMapping.xml file.
If you do not specify a location for the javaArtifactMapping.xml file, the loganalyzer searches for the file in the following locations:
*When you provide only a directory location for the logfile argument, the loganalyzer searches for the javaArtifactMapping.xml file in the specified directory.
*When you provide a directory location and file name for the logfile argument, the loganalyzer searches for the javaArtifactMapping.xml file by traversing the directories to find the logfile and then does the same search to find the javaArtifactMapping.xml file. For example, if the logFile is in C:\Directory1\Directory2\Directory3\errors.log, then the expected location and name of the JavaArtifactMapping.xml is C:\Directory1\Directory2\config\javaArtifactMapping.xml file.
{-s | --server}
Specifies a server available on the local system. When you do not specify a server instance, the loganalyzer uses the default My webMethods Server instance.
{-a | --action}
Specifies the information type to analyze. The default value is frequency. The valid values for this option are as follows:
*all captures information about all messages.
*frequency captures information about messages by the frequency of their appearance.
*severity captures information about messages according to their severity.
Note: You can specify the {-e |--severity} option to narrow the results in the frequency report to include only the results that have a severity level you specify.
*component captures information about environment-related messages.
*product captures information about Java-related messages
*logger captures information about database-related messages.
{-e |--severity}
Reports on the severity level that you supply. You can only use this option when also using the action option with the frequency value. The default value is INFO. Specify one of the following severity levels:
*DEBUG
*ERROR
*FATAL
*INFO
*WARN
{-x | --xml}
Displays XML output in the console window.
{-o | --output}
Saves the XML output to a file on the file system and does not display it in the console window. Valid only with the {-x | --xml} option.
{-h | --help}
Displays command help text about the command, the available options and arguments, and default values.
Usage Notes
*The loganalyzer command detects changes resulting from installing a single fix of the product because the version numbers of the internal JAR files and the product components might differ.
*If you specify that you want the loganalyzer command to provide component-oriented output that displays the components that cause the events in the log, loganalyzer also lists fixes, if any, that are applied to the components.
*Before running the loganalyzer command, you might want to update the javaArtifactMapping.xml file if you have installed and deployed any custom components on My webMethods Server. To update the javaArtifactMapping.xml file, see Updating the Java Artifact Mapping File.
*After running the loganalyzer command and determining the product and component raising errors, you might want to narrow your results. You can exclude classes of that component and product from the logging information and the displayed statistics. The next time you run loganalyzer, the result shows other components and products from the stack trace that are possible candidates responsible for the error. Use the excludedMappingClasses.xml file to list class names to exclude from the query of components and products that cause errors.
*The loganalyzer command uses the errors.log which is a log4j-produced result. For more information, see Log4j.
Examples
*Windows example:
loganalyzer.bat C:\softwareag\MWS\tools\diagnostics\bin\errors.log
-f 2d -t 1d -i 90
-j C:\softwareag\MWS\tools\diagnostics\config\javaArtifactMapping.xml
-s myServer -a all -x -o C:\softwareag\MWS\tools\diagnostics\bin\output
*UNIX example:
./loganalyzer /opt/softwareag/MWS/tools/diagnostics/bin/errors.log
-f 2d -t 1d -i 90
-j /opt/softwareag/MWS/tools/diagnostics/config
/javaArtifactMapping.xml
-s myServer -a all -x -o /opt/softwareag/MWS/tools/diagnostics
/bin/output
*The following example shows a loganalyzer command that uses the default {-a | --action} argument frequency to capture log information by the frequency of appearance. In this case, this creates a frequency report from a log4j XML file produced by the dbintegritycheck command. The example command also includes the --severity ERROR option to narrow the results so that the frequency report includes only items with severity level ERROR:
loganalyzer.bat --severity ERROR
C:\softwareag\MWS\tools\diagnostics\bin\db_integrity_report.xml

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release