When a problem occurs, it can be beneficial to consolidate messages from multiple log files into one comprehensive log file for troubleshooting assistance. For example, the existing log files from a partition, a Service Processor, and the Operations Sentinel server can all be combined into one log file. You can do this using:
To consolidate log files using the Consolidate Log Wizard
Click Consolidate Logs on the Tools menu.
The Consolidate Log Wizard opens and displays the Select Logs window.
Choose the existing log files you wish to consolidate from the list of Operations Sentinel logs. To select a range of files, press and hold the Shift key while you use the mouse to select the start and end of the range of logs. To select files individually, press and hold the Ctrl key while you use the mouse to select the desired files.
The Add Files button allows you to add an Operations Sentinel log file that is not in the defined Operations Sentinel log folder. If you want to add an older log file that does not have an .slg extension, you need to change the Files of Type selection to All Files. See Finding an Existing Log File for detailed information on finding an older log file.
The Browse button allows you to select logs from folders other than the default. This can be useful if you want to consolidate Operations Sentinel log files that are not associated with the current Operations Sentinel installation.
The ConsolidateSet button allows you to create sets of consolidated log files. See Consolidating Log Files Set for detailed information on creating consolidated log files sets.
Note: To change a folder, you must know the location of the desired log files. The new folder must contain Operations Sentinel log files. If not, no log files are displayed.
Click Next when you have selected all desired log files.
The Select Period window opens.
In the Consolidated Log Start and Consolidated Log End boxes, set the desired start date, start time, and end time for any 24-hour period. If the end time is less than the start time, the consolidated log continues to the next day.
Click Next.
The Select Consolidated File window opens.
Select the path, name, and file type for the new consolidated log file. The default path and name is logging-folder\ConsolidatedLog\filename.slg where:
logging-folder is your Operations Sentinel data folder.
ConsolidatedLog is the default folder that contains the log files.
filename is the name of your log file. Log Viewer creates the default name yearmonthday-hourminutesecond (for example, 20030123-081523).
.slg is the default file type.
Click Next.
The Verify Definition window opens.
Verify the information you specified for the new consolidated log file. If the information is correct, click Start to begin the log consolidation process.
If your log file produced an error or warning, you must click Back to correct the problem. Errors are listed first and must be corrected to complete the consolidated log process. See Troubleshooting Consolidate Log Wizard Errors for error and warning recovery tips. Correct any problems and click Start again.
The Consolidation Progress window appears. If any information is incorrect, click Back to make additional changes or Cancel to terminate the wizard.
Click Finish.
The consolidated log is displayed within Log Viewer.
Note: The order log entries occur within the consolidated log file may not represent the exact order in which the events actually occurred. Small time variations can occur based on delays in which the events are logged in Operations Sentinel.
To Consolidate log files using the Command Line Interface
Use the following format to consolidate log files using the Command Line Interface:
>SpLogViewer.exe -SERVER <servername> -CONSOLIDATELOG <partition names> -ST <YYYY-MM-DD HH:MM:SS.MIL> -ET <YYYY-MM-DD HH:MM:SS.MIL> -PATH <Path> -FNAME <file name>
where:
-SERVER
Specifies the server on which the logs have to be consolidated.
-CONSOLIDATELOG
Specifies the partitions whose logs have to be consolidated. You can specify either a single partition or multiple partitions.
Note: For multiple partitions, separate the partition names using a space.
-ST
Specifies the start date and start time of the log files in the format YYYY-MM-DD HH:MM:SS.MIL.
-ET
Specifies the end date and end time of the log files in the format YYYY-MM-DD HH:MM:SS.MIL.
-PATH
Specifies the path where the consolidated log set should be created. It is an optional parameter. If the parameter is null or the switch is not specified, the default path, C:\ProgramData\Unisys\Operations Sentinel\LOG\ConsolidatedLog is used.
-FNAME
Specifies the name of the consolidated file.
Examples
The following examples state the different scenarios of executing the command:
With –PATH switch:
SpLogViewer.exe -server server_name -CONSOLIDATELOG partition_name -st 2017-06-19 11:06:28.051 -et 2017-06-19 14:45:08.531 -PATH "C:\\TEST FOLDER" -FNAME Test.slg
Without -PATH switch:
SpLogViewer.exe -server server_name -CONSOLIDATELOG partition_name -st 2017-06-19 11:06:28.051 -et 2017-06-19 14:45:08.531 -FNAME Test.slg
With -PATH switch value not specified:
SpLogViewer.exe -server server_name -CONSOLIDATELOG partition_name -st 2017-06-19 11:06:28.051 -et 2017-06-19 14:45:08.531 -PATH -FNAME Test.slg
Consolidating multiple logs:
SpLogViewer.exe -server server_name –CONSOLIDATELOG partition_name1 partition_name2 partition_name3 partition_name4 -st 2017-06-19 11:06:28.051 -et 2017-06-19 14:45:08.531 -PATH "C:\\TEST FOLDER" -FNAME Test.slg