You can set the cause-codes for the outages post event. This enables the user to have more control in maintaining the availability metrics for the host. There are two modes you can use for a cause code:
The following cause code example is the same in both the interactive and non-interactive modes.
Interactive mode
In interactive mode, a list of all available cause codes for that level is displayed from which you can choose the appropriate code. The following shows the information displayed on the screen when using the Interactive mode.
## Interactive mode## $logtime -M 2 Level-1 Cause Codes - - - - - - - - - - 0) - Undefined 1) - Planned 2) - Unplanned Section? 1 Level-2 Cause Codes - - - - - - - - - - 0) - Undefined 1) - System Management 2) - System Hardware 3) - System Software 4) - Application 5) - Network 6) - Environmental Selection? 4 Level-3 Cause Codes - - - - - - - - - - 0) - Undefined 1) - Patch Installation 2) - Application Upgrade 3) - Dabase Maint 4) - App/Db Schema Mgnt 5) - Configuration 6) - Batch Processing 7) - Application Install 8) - Application Removal 9) - Other Selection ? 8 Modification of event was successful. |
Non-interactive mode
In non-interactive mode, you can set the cause codes using the CLI by invoking logtime. The following shows the command line display when using the non-interactive mode:
## Non-Interactive mode## ## Same functionality of setting the codes L1=1, L2=4, L3=8 is achieved by non-interactive invocation of logtime## $ logtime -M 2,1,4,8 <Modification of event was Successful. |
For example, you should mark a weekly planned upgrade or a planned power outage as a Planned outage with the appropriate reason behind it. In such cases, you can use the logtime utility to modify the originally logged outage event and attach a suitable cause code to it. You can attach up to three levels of cause codes for an outage event.
You can modify any outage event that has already occurred by invoking the logtime as shown:
logtime -M <event# that has to be modified> <L1,L2,L3 causecodes>
This can be done interactively or non-interactively, as described above.
There is also another invocation of logtime with -L option. This allows you to modify the cause code for the last occurred outage.
logtime -M -L <L1, L2, L3 cause codes>
You can get a list of all permissible cause codes for each level by invoking the logtime as shown:
logtime -M