Hitachi

JP1 Version 12 JP1/Base User's Guide


2.4.7 Reattempting to monitor a log file when a trap fails

When the time at which a log file is being monitored conflicts with an update time, the log file might become locked by the updating program, which prevents the log file trap from opening and reading the log file. If this happens, you can still reattempt to monitor the log files.

If the log file trap is monitoring multiple log files and one of the files cannot be opened, the log file trap will reattempt to monitor the log file where the error occurred, and will also continue monitoring the other log files.

If a retry fails, the log file will no longer be monitored. Check the error message and determine whether there is an error in the log file. To restart the monitoring of a log file where an error occurred, restart the log file trap using the jevlogstart command.

The following describes the retry action when the log file trapping function is unable to open a log file at the start of monitoring or fails to read a log file during monitoring.

Organization of this subsection

(1) When a log file cannot be opened for monitoring

The log file that will be monitored opens when you start a log file trap using the jevlogstart command. If the file has been locked by the updating program, it cannot be opened and monitoring will not start. In this case, the log file trapping function will try to open the log file again. You can reconfigure the retry interval and retry count in the action definition file for log file trapping. If you do not specify a retry interval and retry count in the definition file, the log file trapping function will retry only once, after one second has elapsed.

If the log file opens successfully upon the retry, monitoring resumes from the point at which the file was opened.

If the log file fails to open after the specified number of retries, or if the monitoring process has not opened after 3,600 seconds have elapsed since the retries began, the error is reported by an error message and JP1 event 00003A20. For details on this JP1 event, see 17.3.1(14) Details about event ID 00003A20.

The figure below shows an example of the retry process when the log file trap is temporarily unable to open a log file for monitoring. In this example, the retry interval is 1 second and the retry count is 3.

Figure 2‒22: Example of the retry process when a log file cannot be opened for monitoring

[Figure]

(2) When a log file cannot be read during monitoring

The log file trapping function retries five times at 10-millisecond intervals when it fails to read a log file during monitoring. If monitoring has not recovered after five retries, the trap is suspended until the next monitoring time. If the trap is still unable to open the file the next time it attempts to monitor the file, it retries another five times at 10-millisecond intervals. The retry interval and retry count are fixed.

A group of 5 retry attempts performed at 10 millisecond intervals is counted as one set, and retry attempts are considered in terms of sets. You can specify a threshold value for how many retry sets to perform in the action definition file for log file trapping. If you do not specify a threshold value in the definition file, log file trapping function retries the operation until 100 sets have been completed.

If monitoring cannot be recovered after the specified number of retries, monitoring of the log file where the error occurred stops and JP1 event 00003A21 is issued. For details on this JP1 event, see 17.3.1(15) Details about event ID 00003A21.

The figure below shows an example of the retry process when the log file trap is unable to read a log file during monitoring. In this example, a threshold of 3 is set for the number of retry sets.

Figure 2‒23: Example of the retry process when a log file cannot be read during monitoring

[Figure]