Oracle Light Weight Availability Collection Tool User Guide

Setting Up Cause Codes

There are two cause codes you can setup:

cause-code

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:


Note –

The following cause code example is the same in both the interactive and non-interactive modes.


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.

  1. 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.

  2. 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>

  3. You can get a list of all permissible cause codes for each level by invoking the logtime as shown:

    logtime -M

ltreport

You can utilize the CLI ltreport to generate simple availability reports and view them locally for a single host. It can also be used to generate and view availability reports of other hosts' data using the -i option for one host at a time. Thus, this utility facilitates an offline reporting mechanism. The following are examples of various invocations of the ltreport:


bash-3.00# ltreport -v

     Hostname: bs6-s0 Hostid: 8325cb1    Zone:global
     -----------------EVENTS-----------------
     Event[  0]: epoch    Thu Apr 24 08:36:44 2008 -06:00
     Event[  1]: boot   Thu Apr 24 08:36:44 2008 -06:00
Availability: 100.000% (total) 100.000% (adjusted)
   Monitored: 00d-00-00m-00      Since: Thu Apr 24 08:36:44 2008 -06:00s
      Uptime: 00d-00-00m-00
    Downtime: 00d-00h-00m-00s
           Planned: 00d-00h-00m-00s
         Unplanned: 00d=00h-00m-00s
         Undefined: 00d-00h-00m-00s

bash-3.005# ltreport -x
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<single_system_availability_results>
    <systemInfo>
       <hostName>bs06-s0</hostName>
       <hostId>83254cb1</hostId>
       <zoneName>global</zoneName>
       <timeZone>US/Mountain</timeZone>
       <sysSerialNumber>3254CB1\uffff</sysSerialNumber>
       <OSName>SunOS</OSName>
       <OSVersion>5.10</OSVersion>
       <cpuArchitecture>sparc</cpuArchitecture>
       <productType>Serverblade1</productType>
       <lwactVersion>3.1</lwactVersion>
     </systemInfo>
  <event type="epoch" utc="1209047804" timeStamp="Thu Apr  24 08:36:44 2008 -06:00" 
    up="0" dwnPlnd="0" dwnUnplnd="0" dwnUndef="0" cksum="1448" />
  <event type="boot" utc="1209047804" timeStamp="Thu Apr  24 08:36:44 2008 -06:00" 
    up="556" dwnPlnd="0" dwnUnplnd="0" dwnUndef="0" cksum="143d" />
   <event type="time" utc="1209048360" timeStamp="Thu Apr  24 08:36:44 2008 -06:00" 
up="556" dwnPlnd="0" dwnUnplnd="0" dwnUndef="0" elapsed="556" 
totAvail="100.000" adjAvail="100.000" cksum="1c0e" />
</single_system_availability_results>
bash-2.05# ltreport -i
bash-2.05# cp /var/log/83cde40d.lwact.xml  /tmp/myhost.xml
bash-2.05# ltreport -i /tmp/myhost.xml

        Hostname: noyal Hostid: 83cde40d

    Availability: 100.000% (total) 100.000% (adjusted)
       Monitored: 02d-20h-28m-03s  Since: Tue Apr  1 04:32:39 2008 -25200 ..isdst=1
          Uptime: 02d-20h-28m-03s
        Downtime: 00d-00h-00m-00s
               Planned: 00d-00h-00m-00s
             Unplanned: 00d-00h-00m-00s
             Undefined: 00d-00h-00m-00s

For information about installing an XML to HTML converter on your system and viewing this report in a browser, see Graphical User Interface.