This will be the first in a series of posts about the new interfaces for administering a SAS Grid Manager 9.4 M6 environment. M6 introduced a number of drastic changes to SAS Grid Manager, several of which have been the subject of earlier articles written by my colleagues in GEL. In this post, we’ll take a look at some of the ways in which a Grid Administrator might perform typical grid administration tasks using one of the new tools on offer; the SAS Workload Orchestrator Administration Utility, which is run entirely from the command line.
First, a quick recap. SAS Grid Manager is the name of the new offering in M6, which does not include Platform Suite for SAS. It is the new default grid offering, and is developed entirely by SAS; we no longer use Platform Suite for SAS as a third party application for grid computing by default (although a Grid offering that uses Platform Suite for SAS, called SAS Grid Manager for Platform, is still available). Since Platform Suite is not part of the setup, traditional administration tools like the SAS Grid Manager Module for SAS Environment Manager, the SAS Grid Manager Agent Plug-in for SAS Environment Manager, the SAS Grid Manager Plug-in for SAS Management Console and the LSF Command Line Interface that were around prior to SAS 9.4 M6 have also been replaced in or removed from the SAS Grid Manager offering. For a more detailed introduction, please read this post by Edoardo Riva.
The SAS Workload Orchestrator Administration Utility resembles the LSF Command Line Interface in that it provides a facility to monitor and administer the grid nodes, jobs and queues directly from the command line. The syntax of the tool is similar to that of the SAS Viya Command Line Interface (CLI).
The tool is located in <SAS-Config>/Lev1/Applications/GridAdminUtility. The tool can be invoked from the command line by running the sas-grid-cli.sh with an argument to perform the desired function. Use the --help option to see a list of all options available on the command line. See below for some basic examples.
To see a list of queues configured in the environment, run:
sas-grid-cli.sh --mhost <master-host> --mport <port> --grid-user <username> --grid-password <password> show-queues
In this example, we can see the details of the two queues we have defined. Specific queues can be queried by adding an additional option to the end of command; --queue <queue-name>. Queues can also be opened, closed, activated and inactivated, but queues cannot be created or deleted using the command line.
To see information about grid hosts, run:
sas-grid-cli.sh --mhost <master-host> --mport <port> --grid-user <username> --grid-password <password> show-hosts
Note that resource information is displayed for all hosts. You can view host information for for a specific host by adding --host <hostname> to the end of the command.
In addition to viewing host information, administrators can open (using open-host --host <hostname>) and close (close-host --host <hostname>) any of the grid hosts.
sas-grid-cli.sh --mhost <master-host> --mport <port> --grid-user <username> --grid-password <password> show-jobs
In this example, we can see one job running, in the default queue, submitted by user 'sasdemo'. Default behaviour of show-jobs is to display information for all running jobs, but there are several criteria by which we can filter, including by job-id (--id <job-id>), user (--user <username>), queue (--queue <queue>), host (--host <host>), state (--state PENDING|RUNNING|SUSPENDED|FINISHED|ARCHIVED|ALL), and more; use the --help option to see all options.
Jobs can also be suspended, resumed and cancelled using their job-id by using either of the of suspend-job --job <job-id>, resume-job --job <job-id> and cancel-job --job <job-id> commands.
Output can be directed to a log file with the --log <filename> option. Use --debug or --trace to change verbosity.
The gridinfo command can be used to view the grid version, the current master and the expiry date of the current license. Administrators can also run sas-grid-cli.sh update-license --file <license-file-path> to renew the license from the command line.
SASGSUB is the command-line client utility for submitting jobs, commands and programs to the grid for processing, without requiring SAS to be installed on the machine on which it is executed (but note that if you are using the SAS Grid Manager for Platform, it needs the LSF client installed). This utility will be familiar to those who have used earlier versions of SAS Grid software, and it works essentially the same way that it did previously, with one exception; in the new version, jobs will be run as the user whose credentials are provided when submitting the job (directly or via an authinfo file). Previously, jobs ran as the SASGSUB process owner.
The documentation provides a comprehensive list of arguments as well as sample commands for SASGSUB.
Note that in the examples above, the output is displayed in JSON format. A soon-to-be-released hot-fix changes the default output to tabular format (Update: hot fix now available; please see SAS Note 63787). The JSON output can still be displayed by specifying --output json in the command.
Configuration changes cannot be made interactively from the command line using this tool, but administrators can specify a grid configuration file to use. The Workload Orchestrator Web Interface can be used to create (as well as load and update) a grid configuration file. We'll look at this application more closely in a later post.
Note that some of the commands are restricted to administrators; while any authenticated user can view job, host or queue information, they cannot close/open hosts, cancel/resume/suspend jobs, activate/inactivate queues, load configuration files, update licenses or view/modify logging information. Users can authenticate by passing in credentials (as per the examples above), or by referencing an authinfo file. Kerberos authentication is also supported; use the --sspi option instead of specifying credentials.
For more information about the grid in SAS 9.4 M6, view the documentation.
Thanks for reading. Please leave a comment below to ask questions or share your own experiences.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.