SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
helannivas88
Obsidian | Level 7

Hi Team,

 

We have three compute servers ( Grid machines) which is currently running in primary mode. Now I want to capture the cpu statistics of each grid machine via sas program ( because I have to call a Unix script from SAS via X command). By default the Schedule SAS jobs will hit any of the Grid machine randomly  , but I want to write a program ( may be three different program) to explicitly mention the host name where the program has to run.

 

 

How to write a sas program for this requirement???  Thanks in advance.

1 REPLY 1
ErikLund_Jensen
Rhodochrosite | Level 12

Hi @helannivas88 

 

We collect various information from grid servers, but iInstead of executing the linux command from SAS, we have split the process, so each server writes its own information to a file, and the files are later read into SAS.

 

We have identical sh-scripts on all servers that writes results to files in a folder on the shared file system. On each server a crontab entry is added to schedule the script, and the result is a file per command per server.  The files are named so command and server is easily identified. 

 

Then we have SAS jobs, one per command, that read the output files from all servers. The SAS jobs are run in our data warehouse batch scheduled to start after all linux commands are executed, and each job reads files of a given type from all servers, add server name from the filename as a source variable and append  o a permanent SAS dataset.

 

You must have authorization to do the Linux work yourself or be on good terms with your server staff. I would recommend to leave it to them if possible, because they will have to sort it out anyway, if something doesn't work, like your SAS batch account not having the proper permissions to run the script or the script not having permisssions to write to the shared file system. But we never had any trouble with that.

 

 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 603 views
  • 0 likes
  • 2 in conversation