Administer > SA maintenance > SA Start/Stop script

SA Start/Stop script

SA provides a multipurpose script for starting, stopping, and getting the status of SA:

/etc/init.d/opsware-sas

You can use the script to display all SA components installed on a server, to start, stop, or restart all core components, or to start, stop, or restart specific SA components (other than the Oracle database).

For information about starting and stopping the Oracle database, see Starting the Oracle database (Model Repository).

When running the script on a Core Component host, the script performs the necessary prerequisite checks for each component installed on the local system.

If an SA Core’s components are distributed across multiple servers, the start/stop script cannot interact directly with remote servers to start or stop the remote components. However, the script can connect to the remote servers to determine whether prerequisites are met before starting dependent components locally.

When checking prerequisites for components running on remote servers, the script uses time-out values to allow for different boot times and speed differences among servers. If any of the prerequisite checks fail, the script terminates with an error.

Dependency checking by the Start/Stop script

The start/stop script recognizes SA component dependencies and starts SA components in the correct order. The prerequisite checks verify that dependencies are met before the script starts a given component, thus ensuring that the SA components installed across multiple servers start in the correct order.

For example, if the component you are attempting to start requires that another component be running, the script can verify whether:

  • The required component’s hostname is resolvable
  • The host on which the required component is running is listening on a given port

Start/Stop script logs

The start/stop script writes to the following logs:

Start/Stop Script Logging

Log

Notes

/var/log/opsware/startup

When the server boots, the script logs the full text (all text sent to stdout) of the start process for all SA components installed on the local system.

stdout

When invoked from the command line, the script displays the full text of the start process for the components.

syslog

When the server boots, the script runs as a background process and sends status messages to the system event logger.

Start/Stop script syntax

The SA start/stop script has the following syntax:

/etc/init.d/opsware-sas [options] [component1] [component2]...

When you specify specific components to start, stop, or restart, those components must be installed on the local system, and you must enter the names exactly as they are displayed by the list option. The following table lists the options for the SA start/stop script. To see the options of the Health Check Monitor (HCM) also invoked with opsware-sas, see the Options for the HCM Local Test Script .

Options for the SA Start/Stop Script

Option

Description

list

Displays all components that are installed on the local system and managed by the script. The script displays the components in the order that they are started.

start

Starts all components installed on the local system in the correct order. When you use the start option to start a specific component, the script performs the necessary prerequisite checks, then starts the component.

The start option does not start the Oracle database (Model Repository), which must be up and running before the SA components can be started.

Some SA components, such as the Web Services Data Access Engine (twist), can take longer to start. For these components, you can run the script with the start option so that the script runs on the local system as a background process and logs errors and failed checks to the component’s log file.

When you use the start option to start multiple components installed on a server, the script will always run the /etc/init.d/opsware-sas command with the startsync option.

startsync

The startsync option starts all components installed on the local system in a synchronous mode.

When you use the startsync option, the script runs in the foreground and displays summary messages of its progress to stdout.

restart

Stops and starts all components installed on the local system in a synchronous mode. The script stops all local components in reverse order, then it executes the startsync option to restart the components in the correct order.

stop

Stops all components installed on the local system in the correct order.

This option does not stop the Oracle database.

Starting the Oracle database (Model Repository)

The SA start/stop script cannot start the Oracle database (required for the Model Repository), which must be up and running before the SA components can be started. Before you start the SA components, be sure to start the Oracle listener and database by entering the following command:

/etc/init.d/opsware-oracle start

Starting a standalone SA Core

To start a core that has been installed on a single server:

  1. Log in as root to the core server.
  2. Start the Oracle listener and database for the Model Repository:

    /etc/init.d/opsware-oracle start

  3. Start all core components:

    /etc/init.d/opsware-sas start

Starting a multiple server SA Core

SA Core startup order can be affected by several factors. This section describes starting an SA Core in a Multimaster Mesh configuration.

Core Component Hosts Powered Up

If the entire mesh is stopped but the hosts are powered on, the Primary Core must be started first, followed by each secondary core. Each secondary must be started one at a time.

  1. If necessary, determine the servers that host the core’s components. Log in to the Model Repository host as root and invoke the following command:

    /etc/init.d/opsware-sas list

  2. Log in as root to the Primary Core’s Model Repository host and start the Oracle listener and database:

    /etc/init.d/opsware-oracle start

  3. After the database and listener successfully start, run the SA start script on the following Core Component hosts, one server at a time, in the following order:
    • Infrastructure Component bundle host
    • Slice Component bundle (initial Slice) if not installed on the same host as the Infrastructure Component bundle
    • Subsequent Slice Component bundle hosts
    • OS Provisioning Component bundle host
    • Satellite hosts associated with the core

    Invoke the SA start script on each host with this command:

    /etc/init.d/opsware-sas start

The start-up script must complete starting all core components successfully on each host before you invoke it on the next server.

Secondary Core(s)

The start order is the same as above but must be performed after the Primary Core Components have been successfully started. You must start the core components on only one Secondary Core at a time.

Core Component Hosts Powered Down

When the core component hosts are powered off, powering on the hosts also starts SA; therefore, the hosts must be powered on in the following order:

  • Infrastructure Component bundle host
  • Slice Component bundle (Slice0) if not installed on the same host as the Infrastructure Component bundle
  • Additional Slice Component bundle hosts (Slice1 to Slice n), one at a time
  • OS Provisioning Component bundle host
  • Satellite hosts associated with the core, one at a time

The hosts must be powered up one at a time and the SA Core Components must have successfully started before powering up the next server. You can use the tail command on the most recently created log file in /var/opt/opsware/log/startup to determine the startup status of the components on each host.

Starting individual SA Core components

You can specify one or more components to start if those components are running on the local system. You must enter the component names exactly as they are displayed by the list option of the opsware-sas command.

Start order for individual SA Core components

The SA start script starts core components installed on a host in the order listed below. When the script stops components installed on a host, it stops them in reverse of the order in which they were started.

  1. opswgw-mgw: The SA Primary Core Master Gateway
  2. opswgw-cgws0-<facility>: The core-side Gateway for the facility in which the core is running
  3. opswgw-cgws: Other Gateways in the mesh
  4. vaultdaemon: The Model Repository Multimaster Component
  5. dhcpd: A component of the OS Provisioning feature
  6. pxe: The PXE boot environment
  7. memcached: An in-memory caching layer that works with the Software Repository Accelerator (tsunami) component to support remediation and scalability enhancements for agents that communicate directly with a Linux-based SA Core.
  8. spin: The Data Access Engine
  9. mm_wordbot: A component of the Software Repository
  10. tsunami: Software Repository Accelerator, an object store download accelerator that boosts remediation performance and scalability for any agents that communicate directly with a Linux-based SA Core.
  11. waybot: The Command Engine
  12. smb: A component of the OS Provisioning feature
  13. twist: The Web Services Data Access Engine
  14. opswgw-agw0-<facility>: The agent-side Gateway for the facility in which the core is running
  15. opswgw-agws: The Agent Gateways
  16. hub: A component of the Global File System
  17. sshd: A component of the Global File System
  18. apxproxy: The Automation Platform Extension (APX) proxy
  19. spoke: A component of the Global File System
  20. agentcache: A component of the Global File System
  21. occ.server: A component of the SA Client
  22. httpsProxy: HTTP(S) proxy for core components
  23. da: The Application Deployment component
  24. opsware-agent: The Server Agents

To start individual components of an SA core:

  1. Log in as root to the server that has the component you want to start.
  2. (Optional) To list the SA components installed on a server, enter the following command:

    /etc/init.d/opsware-sas list

  3. Enter the following command, wherecomponent is the name as displayed by the list option:

    /etc/init.d/opsware-sas start component

    For example, if the list option displayed twist, enter the following command to start the SA Twist component:

    /etc/init.d/opsware-sas start twist

Alternatively, you can enter the startsync option when starting a component on a server. See Options for the SA Start/Stop Script in this section for a description of the startsync option.

Stopping an SA Core with multiple hosts

When you shut down a mesh, each core must be stopped in reverse of the start order, and each host within the core must be powered down in reverse start order. Each Secondary Core must be shut down one at a time, followed finally by the Primary Core.

Within each core, primary or secondary. /etc/init.d/opsware-sas stop needs to be run on the servers in this order:

Satellite host(s) associated with the core, one at a time

OS Provisioning Component bundle host

Additional Slice Component bundle hosts (Slice1 to Slice n), one at a time

Slice Component bundle (Slice0) if not installed on the same host as the Infrastructure Component bundle

Infrastructure Component bundle host

Database/Model Repository host

To stop the core components on a host, invoke the following command:

/etc/init.d/opsware-oracle stop