1 Managing STA Services

This chapter includes the following sections:

About the STA Administration Environment

WebLogic is the application server that hosts the STA application. The STA administration environment consists of a single WebLogic domain, a MySQL database server, and the STA services daemon. The name assigned to the WebLogic domain is TBI, and this name must not be changed.

All resources for the STA environment are automatically started when the STA application is started. See "STA Application Startup and Shutdown Sequences" for details.

Table 1-1 shows memory usage requirements for the environment.

Table 1-1 Memory Usage Requirements

Item Memory Requirement

STA administration server

2 GB heap size

STA managed servers

2 GB heap size

MySQL database server

2 GB memory


Domain Servers

Following are the TBI domain servers and the processes they control.

  • Administration server (staweblogic)—Control entity for the TBI domain; provides all security mechanisms.

  • Managed servers:

    • staadapter—SNMP communication with the libraries; stores data received from the libraries.

    • staengine—Transforms data from the staadapter for the STA database.

    • staui—STA user interface

The administration server (staweblogic) must be running before the managed servers can be started. When the managed servers start up, they contact the administration server for their configuration information. Once they are up and running, if the administration server becomes unavailable, the managed servers continue to run uninterrupted.

STA Services Daemon

The STA Services daemon, staservd, is a continuously running Linux service that manages and runs the STA Backup and Resource Monitor (Resmon) services. The daemon must be running for these services to be available. The services run as separate execution threads within the STA services daemon.

The STA Services daemon is automatically started when the STA application is started and runs continuously in the background. The daemon is terminated when the STA application is shut down. See "STA Application Startup and Shutdown Sequences".

You can also start, stop, and display the status of the STA services daemon independently of the STA application. See "STA Services Tasks" for instructions.

Note:

The Backup and Resmon services are disabled by default when STA is installed and you must configure the services to enable them. See "Administering the STA Database" and "Monitoring STA Server Resources" for details.

STA Application Startup and Shutdown Sequences

The STA processes are started and stopped in the following sequences when the STA application is started and shut down.

Startup sequence

When the STA application is started, the STA processes are started in the following sequence.

  1. MySQL database server (mysql)

  2. WebLogic administration server (staweblogic)

  3. staEngine (staengine)

  4. staAdapter (staadapter)

  5. staUi (staui)

  6. STA services daemon (staservd)

Shutdown sequence

When the STA application is shut down, the STA processes are stopped in the following sequence.

  1. staUi (staui)

  2. staAdapter (staadapter)

  3. staEngine (staengine)

  4. WebLogic administration server (staweblogic)

  5. STA services daemon (staservd)

  6. MySQL database (mysql)

Using the WebLogic Administration Console

The WebLogic administration console allows you to log in directly to the WebLogic server and display or modify the TBI domain. Because you perform almost all STA configuration and administration activities through the STA installer, STA application, or STA utilities, you do not normally need to use the WebLogic administration console.

Oracle recommends that you use the WebLogic administration console only for the following activities, depending on your site requirements.

All configuration information for the TBI domain is maintained in the following file:

/Oracle_storage_home/Middleware/user_projects/domains/TBI/config/config.xml

where Oracle_storage_home is the Oracle storage home location specified during STA installation.

STA Services Tasks

Note:

The following tasks use the STA command. See "Using the STA Command" for usage details.

Ensure the Correct root User Path

Use this procedure to ensure that the path for the system root user includes the directory for the STA command and the staresmonadm and staservadm utilities.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Display the PATH variable and verify that it includes the following directory:

    /Oracle_storage_home/StorageTek_Tape_Analytics/common/bin

    where Oracle_storage_home is the Oracle storage home location specified during STA installation.

    For example:

    # echo $PATH
    /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/sbin:/bin:/usr/sbin:/usr/bin:/Oracle/StorageTek_Tape_Analytics/common/bin
    
  3. If the directory is missing, use a text editor to open the user profile and add it. For example:

    # vi /root/.bash_profile
    PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin
    

    Save and exit the file.

  4. Log out and log back in as the system root user.

  5. Confirm that the PATH variable has been updated correctly.

    # echo $PATH
    /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/sbin:/bin:/usr/sbin:/usr/bin:/Oracle/StorageTek_Tape_Analytics/common/bin
    

Display the Status of the STA Application

Use this procedure to display the current status of the STA application. The application is started automatically when you install STA, and therefore should normally be running.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Display the application status. It may take a few minutes for the command to complete.

    # STA status all
    mysql is running
    staservd service is running
    staweblogic service is running
    staengine service is running
     .... and the deployed application for staengine is in an ACTIVE state
    staadapter service is running
     .... and the deployed application for staadapter is in an ACTIVE state
    staui service is running
     .... and the deployed application for staui is in an ACTIVE state
    #
    

    If the application is not running, try restarting it. See "Start the STA Application" for instructions.

Stop the STA Application

Use this procedure to gracefully shut down the STA application. You need to use this procedure when performing certain database tasks, such as moving or restoring the STA database. See "Administering the STA Database" for details.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Stop STA. It may take several minutes for the command to complete.

    # STA stop all
    Stopping the staui service......
    Successfully stopped the staui service
    Stopping the staadapter service......
    Successfully stopped the staadapter service
    Stopping the staengine service......
    Successfully stopped the staengine service
    Stopping the staweblogic service......
    Successfully stopped the staweblogic service
    Stopping the staservd Service...
    Successfully stopped staservd service
    Stopping the mysql service.....
    Successfully stopped mysql service
    #
    
  3. Verify the application has stopped.

    # STA status all
    mysql is shutdown
    staservd service is shutdown
    staweblogic service is shutdown
    staengine service is shutdown.
    staadapter service is shutdown.
    staui service is shutdown.
    #
    

Start the STA Application

Use this procedure to start the STA application, including all associated services. The application is automatically started when you install STA, so under normal circumstances, you only need to use this procedure to restart STA after performing certain database tasks, such as moving or restoring the STA database. See "Administering the STA Database" for details.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Start STA. It may take several minutes for the command to complete.

    # STA start all
    Starting mysql Service..
    mysql service was successfully started
    Starting staweblogic Service..........
    staweblogic service was successfully started
    Starting staengine Service..................
    staengine service was successfully started
    Starting staadapter Service..................
    staadapter service was successfully started
    Starting staui Service...............
    staui service was successfully started
    Starting staservd Service.
    staservd service was successfully started
    #
    
  3. Verify the application has started successfully.

    # STA status all
    mysql is running
    staservd service is running
    staweblogic service is running
    staengine service is running
     .... and the deployed application for staengine is in an ACTIVE state
    staadapter service is running
     .... and the deployed application for staadapter is in an ACTIVE state
    staui service is running
     .... and the deployed application for staui is in an ACTIVE state
    #
    

Display the Status of a Domain Server

Use this procedure to display the status of the administration server or a managed server.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Display the status of the domain server using one of the following options:

    • staweblogic

    • staadapter

    • staengine

    • staui

    The following example shows the staengine server is running normally.

    # STA status staengine
    staengine service is running
     .... and the deployed application for staengine is in an ACTIVE state
    #
    

    The following example shows the staui server is not running.

    # STA status staui
    staui service is shutdown
    # 
    

    If the domain server is not running, try restarting the STA applications. See "Stop the STA Application" and "Start the STA Application" for instructions.

    Caution:

    Although it is possible to stop and start individual STA domain servers, you should do so only under the direction of Oracle Service.

Display the Status of the STA Services Daemon

Use this procedure to verify that the STA services daemon is running. It must be running for the STA Backup and Resmon utilities to be available.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Display the status of the daemon.

    # STA status staservd
    staservd service is running
    

    If the daemon is not running, try restarting it. See "Stop the STA Services Daemon" and "Start the STA Services Daemon" for instructions.

Stop the STA Services Daemon

Use this procedure to stop the STA services daemon. Stopping the daemon does not interrupt the STA application, but the STA Backup and Resmon utilities will be unavailable until the daemon is restarted.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Stop the STA services daemon.

    # STA stop staservd
    Stopping the staservd Service...
    Successfully stopped staservd service
    
  3. Verify the daemon has stopped.

    # STA status staservd
    staservd service is shutdown
    #
    

Start the STA Services Daemon

Use this procedure start the STA services daemon. The daemon is started as part of the STA application startup sequence, so you only need to use this procedure if the daemon has been stopped.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Start the STA services daemon.

    # STA start staservd
    Starting staservd Service.
    staservd service was successfully started
    #
    
  3. Verify the daemon is running.

    # STA status staservd
    staservd service is running
    #
    

Start the MySQL Server

Use this procedure start the MySQL database server. The server is started when the STA application is started, so you only need to use this procedure if you are performing database management activities in which you must shut down the STA application and then restart just the MySQL server. See "Administering the STA Database" for details.

  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Start the MySQL service.

    # STA start mysql
    Starting mysql Service.
    mysql service was successfully started
    #
    
  3. Verify the server is running.

    # STA status mysql
    mysql is running
    #
    

Stop the MySQL Server

Use this procedure stop the MySQL database server. You should use this procedure only if you have been performing database management activities in which the MySQL server is running but the rest of the STA application is not. See "Administering the STA Database" for details.

Caution:

Do not stop the MySQL server if the rest of the STA application is running.
  1. Open a terminal session on the STA server, and log in as the system root user.

  2. Stop the MySQL server.

    # STA stop mysql
    Stopping the mysql service.....
    Successfully stopped mysql service
    #
    
  3. Verify the server is not running.

    # STA status mysql
    mysql is shutdown
    #
    

STA Command Reference

The STA command is located in the following directory:

/Oracle_storage_home/StorageTek_Tape_Analytics/common/bin

where Oracle_storage_home is the Oracle storage home location specified during STA installation.

See "Ensure the Correct root User Path" for instructions on adding the directory to the system root user path.

Using the STA Command

The STA command is used to start, stop, and show the status of the entire STA application or an individual service. Use the command STA help to display complete command syntax and usage information.

Caution:

Although it is possible to stop and start individual STA managed servers, you should do so only under the direction of Oracle Service.

STA Services Administration Logs

The STA services administration logs track all activity of the STA services daemon (staservd) the STA Backup utility (staservadm) and the STA Resource Monitor utility (staresmonadm). The logs can useful for troubleshooting issues with the STA services daemon or the services themselves.

The services administration logs are located in the following directory:

/var/log/tbi/db/backups

Following is a sample directory listing showing the files.


# ls -l /var/log/tbi/db/backups
total 9664
-rw-r--r-- 1 root root    1304 Dec  7 15:19 staresmonadm.log.0
-rw-r--r-- 1 root root    6353 Jan  8 16:17 staservadm.log.0
-rw-r--r-- 1 root root  808936 Feb  3 12:54 staservd.log.0
-rw-r--r-- 1 root root       0 Nov  4 12:31 staservd.log.0.lck
-rw-r--r-- 1 root root 1000085 Jan 28 01:34 staservd.log.1
-rw-r--r-- 1 root root 1000148 Jan 20 02:53 staservd.log.2
-rw-r--r-- 1 root root 1000114 Jan 12 03:57 staservd.log.3
-rw-r--r-- 1 root root 1000082 Jan  4 05:31 staservd.log.4
-rw-r--r-- 1 root root 1000006 Dec 27 06:24 staservd.log.5
-rw-r--r-- 1 root root 1000058 Dec 19 08:23 staservd.log.6
-rw-r--r-- 1 root root 1000098 Dec 11 09:47 staservd.log.7
-rw-r--r-- 1 root root 1000138 Dec  3 10:07 staservd.log.8
-rw-r--r-- 1 root root 1000082 Nov 25 10:52 staservd.log.9

The types of logs are as follows:

  • staservd.log—STA services daemon log. Records when the STA Backup and Resource Monitor services perform their activities. See "STA Backup Service Process" and "ResMon Service Process" for details.

  • staservadm.log—STA Backup utility log. Provides an audit trail of all usage of the staservadm utility.

  • staresmonadm.log—STA Resource Monitor utility log. Provides an audit trail of all usage of the staresmonadm utility.

For each type of log, there may be up to 10 different log files in the directory, each with a sequential number, 0 to 9, indicating their order. Log "0" is always the active log, and logs "1" through "9" are historical. Log files have a 1.0 MB size limit, and when log "0" reaches the limit, the logs are rotated—log "0" becomes log "1", log "1" becomes log "2", and so on—and a new log "0" is started. Any existing log "9" is overwritten by log "8" and effectively deleted, or rolled off.