BookmarkSubscribeRSS Feed

The SAS_lsm Utility Makes it Easy to Control SAS Servers in a Multi-Tier UNIX/Linux Deployment

Started ‎12-04-2017 by
Modified ‎12-19-2017 by
Views 4,364


In a multi-tier deployment of the SAS Intelligence Platform, starting and stopping the SAS servers has to follow a specific order.  

Until recently, I thought that the only choices for starting and stopping the servers in  a multi-tier SAS deployment was to do it manually (ugh!), write custom scripts (fun, but time-consuming), or look for a third-party tool to manage the process.  None of these choices is ideal in terms of being easy to use and easy to implement.


Then I came across the SAS Global Forum Paper, An Oasis of Serenity in a Sea of Chaos: Automating the Management of Your UNIX/Linux Multi-tiered SA..., which describes the SAS Local Services Management (SAS_lsm) utility. 


What is the SAS_lsm utility?

A quick summary of the SAS_lsm utility is that it uses a configuration file customized to your deployment and ssh commands to orchestrate the operation of the SAS servers. It leverages the sas.servers script on each machine and offers a single command to start, stop, and check the status of the SAS servers across all the tiers in your deployment.  For more details see Usage Note 58231: Utility that manages multi-tiered SAS® services for Unix/Linux deployments.


After reading about the SAS_lsm utility, it seemed like it would be easy to use and easy to install, and much better than the methods I'd used previously. Of course, the best way to get familiar with the SAS_lsm utility is to try it.


Trying the SAS_lsm utility

I decided to try the SAS_lsm utility on a SAS deployment with six Linux machines: three of the six Linux machines are used for a Metadata cluster, two of the Linux machines are used as Application servers, and the remaining Linux machine is used for the Middle tier. The start-up order, tier name and a short description for each machine is listed in the table below; the shut-down order will be the opposite of the start-up order.


Start-up Order

Tier Name





Metadata node (first configured node)



Metadata node



Metadata node



SAS Application Server (general application server)



SAS Application Server (supporting Visual Analytics)



Middle Tier




There were only two prerequisites listed for installing and using the SAS_lsm utility:

  • BASH shell installed.
  • Multi-directional SSH enabled for the SAS installation account.

Both of these prerequisites were met in my SAS environment, therefore, I didn't need to spend any time setting them up .  If your environment doesn't meet these prerequisites, a quick Internet search will give you instructions on installing the BASH shell or setting up SSH.


Installation of the SAS_lsm utility


I followed the steps outlined in Usage Note 58231: Utility that manages multi-tiered SAS® services for Unix/Linux deployments for downloading and installing the SAS_lsm utility to the Meta machine. The installation, including the download and running the installation script, took just a few minutes. 


Configuration of the SAS_lsm utility


The configuration was also very straight forward. The Global Forum Paper contained detailed examples that were easy to adapt for my environment.  Here is the configuration file for my deployment:



You may use any name for the configuration file; I used the default name of multi-tier-MCM.template.


Setting up the configuration file, including time spent referring to examples in the Global Forum Paper , took me between 15 and 20 minutes. I had already read through the paper once and had a good idea what the configuration file needed.  You should plan for a little longer setup for your first time configuring the utility.


Using the SAS_lsm command


Once I had the SAS_lsm utility configured, the commands to start, stop, and check the status of the SAS servers worked flawlessly.


Executing the SAS_lsm command without any argument will give these brief usage notes:


<<USAGE>> [bash | sh] SAS_lsm [-a <NUM> | -o <NUM> | -s] -c <CFG>


    -a NUM     start deployment tier services from tier NUM to MAXTIERS

    -o NUM     stop deployment tier services from MAXTIERS to tier NUM

    -s         provide status of all deployment tier services

    -c CFG     specify configuration file


   -a, -o, and -s options are not to be run concurrently


For my environment, here are the exact commands I used to control the SAS servers across all machines in the deployment:


Start the SAS servers


Check the status of the SAS servers


Stop the SAS servers



Refer to the Global Forum Paper for more on the SAS_lsm command and its options.


Key Takeaways


  • I was delighted at how straightforward the SAS_lsm utility was to install and how easily  it worked. It will be part of my SAS Administrator's toolkit of tips, tricks, and techniques going forward.
  • Plan for some extra time when you first install the SAS_lsm utility. For this blog, I spent about 1.5 hours total. This time included reading the Global Forum Paper, reading the Usage Note and performing the installation along with basic testing of the SAS_lsm command. Next time I install the utility I expect it will take roughly 20 minutes.
  • Having a single command that can operate the SAS servers in a multi-tier deployment is enormously helpful. The more machines hosting SAS servers in your deployment, the more helpful having a single command to operate them all becomes.
  • The SAS_lsm utility offers an additional feature to collect log files from the various SAS servers it controls - this is great for troubleshooting. Refer to the the utility's documentation for more information.
  • The SAS_lsm utility has flexibility that I didn't explore in this blog. It can be used to control more than just the servers in the sas.servers script. With a bit of scripting work, you could use the SAS_lsm command to orchestrate other non-SAS servers that need to start along with the SAS servers.
Version history
Last update:
‎12-19-2017 10:38 AM
Updated by:



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags