Using the sas.servers Script on UNIX or z/OS to Start or Stop All Servers

About the sas.servers Script

During installation, the SAS Deployment Wizard creates a sas.servers script on each UNIX and z/OS server tier machine. You can perform the following tasks with this script:
  • start, stop, or restart all of the essential SAS servers and spawners on the machine in the correct order by using a single command
  • display the status of all the essential SAS servers and spawners on the machine by using a single command
Note:
  • Effective with SAS 9.3, the script does not include the SAS Deployment Tester server.
  • To use the script on z/OS systems, you must run the servers under UNIX System Services (USS). On z/OS systems, SAS recommends operating servers as started tasks. See Starting and Stopping SAS Servers on z/OS.
The script performs the preceding tasks for all instances of the following servers, spawners, and services that are installed on the machine:
  • SAS Metadata Server
  • SAS object spawner
  • SAS OLAP Server
  • SAS/CONNECT spawner
  • SAS/SHARE server
  • SAS Framework Data Server
  • SAS Services Application (Remote Services)
The sas.servers script is located in the top level of your configuration directory. For example, in a Level 1 deployment, the script is located in the following path:
SAS-configuration-directory/Lev1/.
CAUTION:
You should not directly update the sas.servers script.
If the script needs to be updated (for example, to add new servers or remove servers), then regenerate the script by using generate_boot_scripts.sh.

Use the sas.servers Script to Start, Stop, or Restart All Servers or to Display the Status of Servers

To use the sas.servers script to start, stop, or restart all essential servers on a UNIX or z/OS machine or to display the status of all servers on the machine, follow these steps:
  1. Log on as the SAS Installer user (for example, sas).
  2. Go to the directory SAS-configuration-directory/Lev1/.
  3. Type ./sas.servers followed by one of the following arguments:
start
starts the servers and spawners in the following order: SAS Metadata Server, SAS OLAP Server, SAS object spawner, SAS/SHARE server, SAS/CONNECT spawner, SAS Framework Data Server, SAS Remote Services.
Note: The OLAP server, object spawner, SAS/SHARE server, and SAS/CONNECT spawner require that the metadata server be running. If the metadata server is configured on a different host machine, make sure that the server is running before you use this script.
stop
stops the servers and spawners in the following order: SAS Remote Services, SAS Framework Data Server, SAS/CONNECT spawner, SAS/SHARE server, SAS object spawner, SAS OLAP Server, SAS Metadata Server.
Note:
  • When you stop the metadata server, any dependent servers and spawners (whether they are on the same host machine or a different machine) will stop running.
  • Before you stop an OLAP server, you should first stop the active sessions, as follows:
    1. In SAS Management Console, expand the Monitoring node and the SAS OLAP Server Monitor node.
    2. Right-click the name of the logical SAS OLAP Server, and select Connect.
    3. In the dialog box that appears, enter your user name and password and click OK.
    4. Right-click the name of each session that you want to close, and select Close Session.
restart
stops and then starts the servers and spawners in the following order: SAS Metadata Server, SAS OLAP Server, SAS object spawner, SAS/SHARE server, SAS/CONNECT spawner, SAS SAS Framework Data Server, SAS Remote Services.
status
displays the current status of the servers and spawners in the following format:
server-name server-instance (process-ID) is running|is stopped.
For example, the following messages mean that two instances of the SAS OLAP Server are configured on the machine. The first instance is running, and the second instance is stopped: SAS OLAP Server 1 (pid 29529) is runningSAS OLAP Server 2 (pid 29530) is stopped
Note: To use the script on z/OS systems, you must run the servers under UNIX System Services (USS). On z/OS systems, SAS recommends operating servers as started tasks.

Using generate_boot_scripts.sh to Regenerate the sas.servers Script

About generate_boot_scripts.sh

The generate_boot_scripts.sh script enables you to automatically regenerate the sas.servers script for a particular UNIX or z/OS host machine. This feature is useful in the following types of situations:
  • You have configured a new server or spawner on the machine. In this situation, the script generation process detects the new server or spawner and adds it to the sas.servers script.
  • You have removed a server or spawner configuration from the machine. In this situation, the script generation process detects the absence of the server or spawner and removes it from the sas.servers script.
  • You want to remove a server or spawner from the script so that you can operate it separately, or you want to add a server or spawner that you previously removed.
  • You have changed the location of the server's log.

About the server-name.srv Files

On UNIX and z/OS systems, each server's configuration directory contains a file called server-name.srv. For example, the metadata server's configuration directory contains a file called MetadataServer.srv, and the workspace server's configuration directory contains a file called WorkspaceServer.srv.
The generate_boot_scripts.sh script accesses each of the server-name.srv files to determine which servers and spawners are to be included in the sas.servers script. If a server's server-name.srv file contains the keyword ENABLE, then the server is included in the script. If the file contains the keyword DISABLE, then the server is excluded from the script.
In the initial configuration, all server-name.srv files contain the keyword ENABLE.
The server-name.srv files also contain the path to the server's start-up script and the path to the server's log files.

Regenerate the sas.servers Script

To regenerate the sas.servers script, follow these steps:
  1. Log on as the SAS Installer user (for example, sas).
  2. If you want to remove a server or spawner from the script, or if you want to add a server or spawner that you previously removed, follow these steps:
    1. Navigate to the server's configuration directory and open the file server-name.srv in an editor.
      For example, if you want to remove the SAS/SHARE server from the script, you would go to SAS-configuration-directory/Lev1/ShareServer and open the file ShareServer.srv.
    2. Locate the line that contains the keyword ENABLE or DISABLE. If you want to exclude the server from the sas.servers script, change the keyword to ENABLE. If you want to include the server in the sas.servers script, change the keyword to DISABLE. Save the file.
  3. Go to the directory SAS-configuration-directory/Lev1/.
  4. Enter the following command: ./generate_boot_scripts.sh
    A new sas.servers script is created to reflect the servers that are currently configured on the machine. If any of the server-name.srv files contain the keyword DISABLE, the following message appears:
    <number-of-disabled-servers> SAS servers were explicitly disabled in their .srv files

Install sas.servers as a Boot Script

On UNIX machines, you can choose to install the sas.servers script as a boot script so that the servers will start automatically when you start the machine. The comments in the sas.servers script contain installation instructions that are specific to your operating environment.