Specifying number of lines to search a match string
PATROL KM for Log Management enables you to specify the number of lines to search a match string. Depending on the value that you specify the KM displays the number of lines, when a match is found.
If the search string occurs again within the number of lines selected to be displayed, the KM will not find that instance of the search string for all search identifiers.
To specify the number of lines to search a match string
- Access the LOG application menu as described in Accessing KM menu commands.
- Select Add Instance.
- In the Add Instance dialog box, configure a new search string. Enter the label for the new file and select Text Instance as the type of file instance.
- Click Accept.
- In the Add File for Label: instanceName dialog box, amongst the configuration properties to monitor a log file, specify a value in the Number of Lines in Log Entry text box.
The KM displays the specified number of lines when a match is found.
For example, if you want to determine when a disk is full and where the disk is mounted, enter Error: Disc Full as the Search String and 2 as the value for Number of Lines in Log Entry. When a disk is full, a message similar to the following one is displayed in Last Strings Matched by the Template Regular Expression (LOGMatchString) text parameter:
031605: Error: Disc Full
/hd001 mounted as /opt
If either, the search string or the nullify string, occurs again within the number of lines selected to be displayed, the KM does not find the instances of the search strings for all the search identifiers.