Hello community
I'm going to code up something that submits the "ps -ef" command on Unix. In fact, I've already done that and I'm able to read it in quite nicely.
The problem is, SAS will determine which Unix server it runs against via the Grid head node. What I'd prefer, is that I am able to forcibly select each specific server n Grid boxes and n LASR boxes so I can run this command on all of them.
I suspect I may need to actually create a .sh file in Unix to do this for me and call that via SAS, but if anyone knows how to do this in SAS I'd be greatful for some insight.
Here's a snapshot of where I've got to so far.
%macro Zombies(server); data _null_; /* do i = 1 to countw("&ServerList.",'|');*/ ps = "ps -efl | sort -k 4n,4 | grep ""defunct"" > /dir/dir/dir/defunct.txt"; call system (ps); /* end;*/ ;run; %mend; %Zombies(servername);
Thanks in advance,
Dan
Hi there
I've ended up coding this up into a macro which ssh's across the LASR nodes from whatever Grid box it's running on. It's driven by a txt file which contains all LASR server names, and ssh's across, submitting the 'ps' command and storing the output into a separate file, suffixed with each server name.
It's the most elegant solution I could find, but I'll have a look at these agents. We're on 9.4_M3.
Cheers,
Dan
Hi there
I've ended up coding this up into a macro which ssh's across the LASR nodes from whatever Grid box it's running on. It's driven by a txt file which contains all LASR server names, and ssh's across, submitting the 'ps' command and storing the output into a separate file, suffixed with each server name.
It's the most elegant solution I could find, but I'll have a look at these agents. We're on 9.4_M3.
Cheers,
Dan
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.