Oracle Light Weight Availability Collection Tool User Guide

Chapter 5 Working with the Oracle Lightweight Availability Collection Tool

This chapter contains the following sections:

Graphical User Interface

The Oracle Lightweight Availability Collection Tool comes with a browser-based GUI display that is used to display the recorded availability results so they are easy to understand. You must configure, and run a web server on the host where the Oracle Lightweight Availability Collection Tool is installed. You can then use simple web services to display the Availability datagram report in a web browser.

A predefined set of XSL style sheets are provided when the Oracle Lightweight Availability Collection Tool is installed. An XSL translator is required to translate the datagrams to HTML and to display it in the web browser.

A web services Perl script is provided as a reference application when the package is installed.

In order to display the availability reports in the GUI, you must have an XML to HTML converter. Xalan is one such software. It is available as a C based binary as well as java based jar file.

Xalan Installation

To install Xalan, decide whether you want to install the C based binary or the java based jar file, and complete the steps in the appropriate section:


Note –

The prerequisite (common for both C and Java based Xalan) is that the Oracle Lightweight Availability Collection Tool and an Apache web server must be installed in the system. The Apache web server can be downloaded from http://httpd.apache.org/download.cgi.


Installation and Configuration of the C Based Xalan Software

To configure the GUI for the Oracle Lightweight Availability Collection tool, you need to have Xalan and Xerces binaries installed in the host.

Download and Unpack the Software

  1. Download the latest Xalan-c software from http://www.apache.org/dyn/closer.cgi/xml/xalan-c.

    This URL provides links to different mirror sites. The binaries are available under the Binaries folder on any of these mirror sites. It can be downloaded in the form of *.tar.gz according to system specification (32 or 64 bit).

    For these instructions assume that the download path is /export/lwact/installables/xalan and that you are going to download the Xalan binary Xalan-C_1_10_0-solaris_28_64-cc_62.tar.gz for a 64 bit Solaris system.

  2. To verify download of the Xalan-c software file to /export/lwact/installables/xalan, type the following commands:


    bash-2.05# pwd
    /export/lwact/installables/xalan
    bash-2.05# ls
    Xalan-C_1_10_0-solaris_28_64-cc_62.tar.gz
    
  3. Unpack the archive to install Xalan in the system; type the following commands:


    Note –

    The path for binary Xalan is /export/lwact/installables/xalan/Xalan-C_1_10_0-solaris_28-cc_62/bin and the path for Xalan library is /export/lwact/installables/xalan/Xalan-C_1_10_0-solaris_28-cc_62/lib.



    bash-2.05# gunzip Xalan-C_1_10_0-solaris_28_64-cc_62.tar.gz
    bash-2.05# ls
    Xalan-C_1_10_0-solaris_28_64-cc_62.tar
    bash-2.05# tar -xvf Xalan-C_1_10_0-solaris_28_64-cc_62.tar
    bash-2.05# ls
    Xalan-C_1_10_0-solaris_28_64-cc_62
    bash-2.05# cd Xalan-C_1_10_0-solaris_28_64-cc_62
    bash-2.05# ls
    KEYS LICENSE NOTICE bin/ include/ lib/ samples/
    bash-2.05# cd bin
    bash-2.05# ls
    CompileStylesheet SerializeNodeSet StreamTransform UseStylesheetParam
    DocumentBuilder SimpleTransform ThreadSafe Xalan
    ExternalFunction SimpleXPathAPI TraceListen XalanTransform
    ParsedSourceWrappers SimpleXPathCAPI TransformToXercesDOM XalanTransformerCallback
    bash-2.05# pwd
    /export/lwact/installables/xalan/Xalan-C_1_10_0-solaris_28-cc_62/bin
    bash-2.05# cd ../lib
    bash-2.05# pwd
    /export/lwact/installables/xalan/Xalan-C_1_10_0-solaris_28-cc_62/lib
    
  4. Download the latest Xerces-c library file from http://www.apache.org/dyn/closer.cgi/xml/xerces-c.

    This URL provides links to different mirror sites. The binaries are available under the Binaries folder of any mirror site. It can be downloaded in the form of *.tar.gz according to system specification (32 or 64 bit).

    For these instructions, assume that the download path is /export/lwact/installables/xerces and that you are going to download the Xerces binary xerces-c_2_7_0-solaris_28-cc_62.tar.gz for a 64 bit Solaris system.

  5. Type the following commands to download the Xerces-c library file to /export/lwact/installables/xerces


    bash-2.05# pwd
    /export/lwact/installables/xerces
    bash-2.05# ls
    xerces-c_2_7_0-solaris_28-cc_62.tar.gz
    
  6. Unpack the archive to install Xerces-c in the system; type the following commands:


    Note –

    The path for xerces library is /export/lwact/installables/xerces/xerces-c-solaris_28-cc_62/lib.



    bash-2.05# gunzip xerces-c_2_7_0-solaris_28-cc_62.tar.gz
    bash-2.05# ls
    xerces-c_2_7_0-solaris_28-cc_62.tar
    bash-2.05# tar -xvf xerces-c_2_7_0-solaris_28-cc_62.tar
    bash-2.05# ls
    xerces-c-solaris_28_64-cc_62
    bash-2.05# cd xerces-c-solaris_28_64-cc_62
    bash-2.05# ls
    LICENSE Readme.html credits.txt etc lib samples version.incl
    NOTICE bin doc include msg scripts
    bash-2.05# cd lib
    bash-2.05# ls
    libxerces-c.so libxerces-c.so.27.0 libxerces-depdom.so.27
    libxerces-c.so.27 libxerces-depdom.so libxerces-depdom.so.27.0
    bash-2.05# pwd
    /export/lwact/installables/xerces/xerces-c-solaris_28-cc_62/lib
    

Provide 755 Access Permissions

  1. To provide 755 access permissions to the /opt/SUNWlwact/xsl directory, type the following command:


    bash-2.05# chmod -R 755  /opt/SUNWlwact/xsl
    
  2. Type the following command to copy the directory pacifico from /opt/SUNWlwact/misc/ to /var/apache/htdocs/


    bash-2.05# cp -rf /opt/SUNWlwact/misc/pacifico /var/apache/htdocs/
    
  3. Type the following commands to provide 755 access permission to the cgi-bin directory:


    bash-2.05# chmod 755 /var/apache/cgi-bin
    
  4. Type the following commands to provide 755 access permission to the pacifico directory:


    bash-2.05# chmod -R 755 var/apache/htdocs/pacifico
    

    The web browser-based Availability report for a single host is created by the /opt/SUNWlwact/sdk/my_uptime.cgi script, which is part of Oracle Lightweight Availability Collection Tool package installation.

Complete the Installation

  1. Copy my_uptime.cgi file from /opt/SUNWlwact/sdk/ to /var/apache/cgi-bin/


    bash-2.05# cp /opt/SUNWlwact/sdk/my_uptime.cgi /var/apache/cgi-bin/
    
  2. Type the following command to provide 755 access permission to the file /var/apache/cgi-bin/my_uptime.cgi:


    bash-2.05# chmod 755 /var/apache/cgi-bin/my_uptime.cgi
    
  3. Modify /var/apache/cgi-bin/my_uptime.cgi to include correct path for Xalan, Xerces libraries, the XSL path and the Xalan binary path:


    bash-2.05# vi /var/apache/cgi-bin/my_uptime.cgi
    
  4. At the beginning of the Variable Initialization section, type the following statement to include the libraries for Xalan and Xerces:


    $ENV{'LD_LIBRARY_PATH'} = 
    "/export/lwact/installables/xalan/Xalan-C_1_10_0-solaris_28-cc_62/lib:
    /export/lwact/installables/xerces/xerces-c-solaris_28-cc_62/lib:
    $ENV{'LD_LIBRARY_PATH'}";
    
  5. Make sure that the input file is included properly by verifying value of $input:$input="/var/log/$hostId.lwact.xml";

    If you manually modify the path for the log file (LOGDIR in /etc/default/lwact file), the value of $input must be modified accordingly. The value set to the $xalan variable must be modified to point to Xalan in the system:


    $xalan="/export/lwact/installables/xalan/Xalan-C_1_10_0-solaris_28-cc_62/bin/Xalan";
  6. Make sure that the variable $xslt points to singleLWACT.xsl in /opt/SUNWlwact/xsl: $xslt="/opt/SUNWlwact/xsl/singleLWACT.xsl";

  7. Replace avoidance.central with the Fully Qualified Domain Name (FQDN) of the your host in the subroutine display_results():

    print "<meta http-equiv=\"Refresh\" content=60; URL=http://avoidance.central/cgi-bin/my_uptime.cgi\">\n";

  8. To view the GUI-based Oracle Lightweight Availability Collection Tool availability report, type the following URL in the address field of your web browser: http://<FQDN>/cgi-bin/my_uptime.cgi

Installation and Configuration of the Java based Xalan

Download and Unpack the Software

  1. Download the Xalan jar from http://www.apache.org/dyn/closer.cgi/xml/xalan-j

    This URL provides links to different mirror sites and the Xalan jar can be downloaded in the form of *.tar.gz.

    For these instructions assume that the download path is /export/lwact/installables/xalanand that you are going to download the Xalan xalan-j_2_7_1-bin-2jars.tar.gz.

  2. Type the following commands to verify download of the Xalan jar to the /export/lwact/installables/xalan


    bash-2.05# pwd
    /export/lwact/installables/xalan
    bash-2.05# ls
    xalan-j_2_7_1-bin-2jars.tar.gz
    
  3. To unpack the archive and install Xalan in the system, type the following command:


    bash-2.05# gunzip xalan-j_2_7_1-bin-2jars.tar.gz
    
    bash-2.05# ls
    xalan-j_2_7_1-bin-2jars.tar
    bash-2.05# tar -xvf xalan-j_2_7_1-bin-2jars.tar
    bash-2.05# ls
    xalan-j_2_7_1
    bash-2.05# cd xalan-j_2_7_1
    bash-2.05# ls
    docs NOTICE.txt samples xalan.jar xml-apis.jar
    LICENSE.txt readme.html serializer.jar xercesImpl.jar xsltc.jar
    bash-2.05# pwd
    /export/lwact/installables/xalan/xalan-j_2_7_1
    

    Note –

    The path for xalan.jar is the following: /export/lwact/installables/xalan/ xalan-j_2_7_1


Provide 755 Access Permissions

  1. Copy the directory pacifico from /opt/SUNWlwact/misc/ to /var/apache/htdocs/


    bash-2.05# cp -rf /opt/SUNWlwact/misc/pacifico /var/apache/htdocs/
    
  2. Provide 755 access permission to the /opt/SUNWlwact/xsl


    bash-2.05# chmod -R 755 /opt/SUNWlwact/xsl
    
  3. Provide 755 access permission to the directory /var/apache/htdocs/pacifico


    bash-2.05# chmod -R 755 /var/apache/htdocs/pacifico
    

Complete the Installation

The browser-based Availability report for single host is created by /opt/SUNWlwact/sdk/my_uptime.cgi script which is part of the Oracle Lightweight Availability Collection Tool package installation.

  1. Copy my_uptime.cgi file from /opt/SUNWlwact/sdk/ to /var/apache/cgi-bin/


    bash-2.05# cp /opt/SUNWlwact/sdk/my_uptime.cgi /var/apache/cgi-bin/
    
  2. Type the following command to provide 755 access permission to the file /var/apache/cgi-bin/my_uptime.cgi:


    bash-2.05# chmod 755 /var/apache/cgi-bin/my_uptime.cgi
    
  3. Modify /var/apache/cgi-bin/my_uptime.cgi to include correct path for Xalan, the XSL path, and the Xalan binary path:


    bash-2.05# vi /var/apache/cgi-bin/my_uptime.cgi
    
  4. Set the value of the $xalan variable to point to the path where the xalan.jar exists in the system:


    $xalan="/export/lwact/installables/xalan/xalan-j_2_7_1;
    
  5. Set the value of the $syscmd variable:


    $syscmd="/usr/bin/java -jar $xalan/xalan.jar -in $input -xsl $xslt -out $output";
    

    If you manually modify the path for the log file (LOGDIR in /etc/default/lwact file), the value of $input must be modified accordingly: $input="/var/log/$hostId.lwact.xml";

  6. Ensure that the $xslt variable points to singleLWACT.xsl in /opt/SUNWlwact/xsl/: $xslt="/opt/SUNWlwact/xsl/singleLWACT.xsl";

  7. Replace avoidance.central with the Fully Qualified Domain Name (FQDN) of your host in the subroutine display_results():

    print "<meta http-equiv=\"Refresh\" content=60; URL=http://avoidance.central/cgi-bin/my_uptime.cgi\">\n";

  8. To view the GUI-based Oracle Lightweight Availability Collection Tool availability report, type the following URL in the address field of your web browser: http://<FQDN>/cgi-bin/my_uptime.cgi

Troubleshooting

This section explains the troubleshooting steps for the Oracle Lightweight Availability Collection Tool.

Oracle Lightweight Availability Collection Tool Error Messages

This section lists the various errors logged by the Oracle Lightweight Availability Collection Tool, their functional meaning, and any actions that should be taken when these errors are displayed either in /var/adm/message or on the screen.

[logtime] Default causecode [XX] at LWACT configuration file is invalid

Indicates that an invalid cause code entry is in the /etc/default/lwact file. The user can set up to three levels of default cause codes for the outage events in this file. The cause code level that contains incorrect entry is logged in the error message with the square brackets ([]); that is, XX can take either [L1CC] or [L2CC], or [L3CC] based on the level of cause code that is invalid.

Action: Enter the valid set of cause codes against the L1CC, L2CC, L3CC fields in the /etc/default/lwact file. Use logtime -M command to get the list of valid cause codes for all three levels.

Invalid event number

Indicates that a user has tried to modify the cause code for an invalid event number; that is, a non-outage event. Users can modify/assign the cause codes in only the halt and panic outage events.

Action: Use the ltreport -v command to display the list of outage events along with their corresponding event numbers.

Invalid Level-X cause code: Invalid cause code entered

Indicates that a user has entered invalid an cause code for the level displayed in the message. X can be either 1, 2 or 3.

Action: For each level 1 cause code, there is a corresponding umbrella of level 2 and level 3 cause codes under it. The only valid cause codes for that level is listed under the umbrella. To obtain the valid list of cause codes, use the logtime -m command.

[logtime] event entry X was modified

Indicates a user has successfully modified the event number X. In this message, X is the event number.

Action: No action is required. Informational only.

[tictimed]: stopping on SIGTERM or SIGPWR

This message is logged when the Oracle Lightweight Availability Collection Tool terminates (for example, in the case of pkgrm).

Action: No action is required. Informational only.

[tictimed] Daemon instance already running

Indicates a user has tried to start the tictimed daemon that is already running.

Action: No action is required. Informational only.

[tictimed] Catastrophic file error - zero length

LWACT is removing the zero byte file and starting afresh. Occurs when the availability datagram file turns to 0 bytes in size for an unknown reason.

Action: For pre-LWACT 3.2 installation, remove the zero byte file, tictimed will recreate it. For LWACT 3.2 or higher versions, no action is required. LWACT will automatically remove the zero byte file.

[tictimed] datagram file corruption detected

The entire message is as follows:


[tictimed] datagram file corruption detected. LWACT is quarantining the 
corrupted file and starting afresh. If required user can pick up the uncorrupted
datagram file from the last run explorer output in-rder to avoid considerable
data loss.

Whenever the Availability datagram is found to be corrupted, the Oracle Lightweight Availability Collection Tool automatically quarantines it to the same folder where the Availability datagram is present with a filename of the format: lwact_corrupted_<UTC at which the corruption was detected> (for example: lwact_corrupted_1208531225). Quarantining the Availability datagram causes a data loss in the Oracle Lightweight Availability Collection Tool. Old data, collected before the file corruption occurred, will not be taken into account by the tool during the availability calculation.

Action: In order to minimize this data loss, you can manually obtain the uncorrupted copy of the datagram from the previous Explorer image.

[tictimed] Unable to update timestamp on log file

If the Availability datagram is lost or deleted for some reason, tictimed, which periodically updates the timestamp on the log file, will not be able to carry out this activity. Hence, it logs the error message. A few possible cases where this error can occur are the following:

Action: No action is required. tictimed will automatically recreate the file afresh if it does not find it.

Attempting to start LWACT. Respawning inittab

Indicates that user has attempted to start LWACT manually using the init script.

Action: No action required. Information only.

LWACT is already running

Indicates that user has attempted to start LWACT which was already running.

Action: No action required. Information only.

LWACT is going down

Indicates that user has attempted stop LWACT manually using the init script.

Action: No action required. Information only.

**ATTENTION** Event generation not in chronological order. It can affect availability metrics

The entire message is as follows:


**ATTENTION** Event generation not in chronological order. It can affect 
availability metrics. Sudden fall back in system date may have caused this. Check and 
correct system date. Otherwise, quarantine current datagram to start monitoring 
availability afresh. 

Occurs when the availability events are recorded out-of-sequence in the availability datagram. out-of-sequence events can occur due to sudden fall back in system date (for example, system shutdown today and boots back to a date from last week). In such cases, LWACT detects the sudden shift in time and records the message indicating the exact time when the system fell back in time. The affected system can report incorrect availability metrics.

Action: You can check and correct the system date or quarantine the current datagram to start monitoring the availability of the system afresh. Please note that old availability metrics will be lost during when the datagram is quarantined.

Failed to list SAVECORE dir contents

Indicates that the SAVECORE directory is clean from any core dumps and therefore LWACT was unable to get the contents of this directory.

Action: No action required. Information only.