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.

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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