BookmarkSubscribeRSS Feed

Controlling SAS servers and services in a Viya environment

Started ‎06-01-2017 by
Modified ‎06-01-2017 by
Views 2,817

One of the great advantages of the new Viya platform is the startup/shutdown process.  Previously an administrator had to be aware of various machines, what servers and services were deployed on them, and what order of start-up was needed; the most obvious piece of this was to make sure that the SAS Metadata Server and the SAS WIP Data Server were up and running before any of the other components.  And it was awkward to start up servers because sometimes it was necessary to delay (for an unknown amount of time) between starting one server and the next.


In the Viya environment, all the servers (such as the CAS server, the SAS Spawner, the http server, etc....) as well as all of the microservices (new in Viya) are handled in the same way:  They are usually installed as enabled Unix services, which means that they will all start automatically when the machines come up, and most importantly, the different machines and components know how to synchronize with each other as they come up, so the administrator does not have to worry about startup order of machines, or individual servers/services on any machine.


The administration of the Viya platform has been made as simple as possible with the inclusion of a new script called "sas-viya-all-services".  Every machine in a deployment (CAS Controllers, CAS Workers, VA/VS/VDMML, et...) all have this script installed, and on each machine, you can just run this script in order to start all the other services on that machine.  In an ideal scenario, this service will be enabled (the default) on all machines in the deployment; thus when you reboot your system it will be executed automatically and you don't have to start anything manually.


Part of the secret here is that, yes of course some services depend on other services, but the services are designed to be more intelligent; if a process comes up and tries to connect to another process and that second process isn't there, the first process will wait (or sleep), then try to connect again, repeatedly, until the second service is available.


You can always manage individual services if needed, using the traditional Linux commands such as  service (sysV), chkconfig (sysV), systemctl (systemd): For example:


For a sysV service, check status, start, stop:


service sas-viya-service-name  start |  stop  | restart | status


List all sysV services and their run levels:


chkconfig --list


For a systemd service, check status, start, stop:


systemctl start | stop | status  sas-viya-service-name


List all systemd services on the machine (that are SAS Viya services):


systemctl list-unit-files | grep viya


One small gotcha is the fact that most of the SAS Viya services are sysV services; only the sas-viya-all-services and the sas-viya-sasdatasvrc* (postgreSQL) services are of the systemd type.   This is usually not an issue, but, if you want to get a list of all Viya services, of both types, on a given machine then use this command:


ls -la /etc/init.d/sas-viya*


Using Ansible to Manage SAS Viya Services To make things even easier, if you have the proper Ansible playbooks deployed on the Ansible controller,  you can use them to do such things as:  1) start all services on all machines, 2) stop all services on all machines (if you need to shutdown the system, for example).  For a large installation with many machines, this could prove a huge convenience and time-saver.    

Version history
Last update:
‎06-01-2017 10:21 AM
Updated by:


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


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 Labels
Article Tags