BookmarkSubscribeRSS Feed
dgower
Obsidian | Level 7

Hi All,

We have a GRID environment with 7 compute nodes.  It's tedious to remote into each node and restart the object spawner service.  Is there a command to use from the master node or an option SAS Management Console that will restart that service on all nodes?

Thanks,

Dan

6 REPLIES 6
dorel_olteanu
Calcite | Level 5

Hi ,

You can write a script to start/stop SAS services , remotely , see SC ( Service Control Manager ) for Windows environment.

Dorel.

acfarrer
Quartz | Level 8

You need a script something like this

#! /bin/ksh

action=status # Or pass as $1 parameter

remotepath=/opt/sas/ServerConfig/Lev1/SASApp  # For example

for node in node1 node2 node3 node4 node5 node6 node7 ; do

$ ssh sasaccount@hostname "$remotepath/ObjectSpawner.sh $action"

done

You will need to create an ssh key pair and put the ssh public key in $HOME/.ssh on each node first then test ssh to each node from sasaccount@masternode

Lenvdb
Quartz | Level 8

I know this is an old post but I am following a similar path to do regular status checks.

I am passing paths, values etc in ksh to ssh into several servers to check the ObjectSpawner status:

 

ssh -tt $servernm ksh -c "$Path/ObjectSpawner.sh status" >>/folder/objectspawners.txt

 

All I get in my text file is a lovely : Usage: ObjectSpawner.sh {-}{start|stop|status|restart}

 

What I should see is a "ObjectSpawner is started"

Why does it not read my "status" param?

gwootton
SAS Super FREQ
If you remove the "ksh -c" part, does it work?
--
Greg Wootton | Principal Systems Technical Support Engineer
Lenvdb
Quartz | Level 8

yep - just tried it and it worked 

 

Bless you !!

 

Anand_V
Ammonite | Level 13
Would suggest developing simple Ansible playbooks to automate admin tasks!

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1595 views
  • 3 likes
  • 6 in conversation