<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I specify from an array of grid &amp;amp; LASR unix boxes which one I want to us for an X command in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-from-an-array-of-grid-amp-LASR-unix-boxes-which/m-p/420562#M280662</link>
    <description>&lt;P&gt;Hello community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;&lt;EM&gt;n&lt;/EM&gt; Grid boxes and&amp;nbsp;&lt;EM&gt;n&lt;/EM&gt; LASR boxes so I can run this command on all of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a snapshot of where I've got to so far.&lt;/P&gt;&lt;PRE&gt;%macro Zombies(server);

	data _null_;
/*		do i = 1 to countw("&amp;amp;ServerList.",'|');*/
			ps = "ps -efl | sort -k 4n,4 | grep ""defunct"" &amp;gt; /dir/dir/dir/defunct.txt";
			call system (ps);
/*		end;*/
	;run;

%mend;
%Zombies(servername);&lt;/PRE&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2017 19:36:31 GMT</pubDate>
    <dc:creator>_Dan_</dc:creator>
    <dc:date>2017-12-12T19:36:31Z</dc:date>
    <item>
      <title>How do I specify from an array of grid &amp; LASR unix boxes which one I want to us for an X command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-from-an-array-of-grid-amp-LASR-unix-boxes-which/m-p/420562#M280662</link>
      <description>&lt;P&gt;Hello community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;&lt;EM&gt;n&lt;/EM&gt; Grid boxes and&amp;nbsp;&lt;EM&gt;n&lt;/EM&gt; LASR boxes so I can run this command on all of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a snapshot of where I've got to so far.&lt;/P&gt;&lt;PRE&gt;%macro Zombies(server);

	data _null_;
/*		do i = 1 to countw("&amp;amp;ServerList.",'|');*/
			ps = "ps -efl | sort -k 4n,4 | grep ""defunct"" &amp;gt; /dir/dir/dir/defunct.txt";
			call system (ps);
/*		end;*/
	;run;

%mend;
%Zombies(servername);&lt;/PRE&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 19:36:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-from-an-array-of-grid-amp-LASR-unix-boxes-which/m-p/420562#M280662</guid>
      <dc:creator>_Dan_</dc:creator>
      <dc:date>2017-12-12T19:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I specify from an array of grid &amp; LASR unix boxes which one I want to us for an X com</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-from-an-array-of-grid-amp-LASR-unix-boxes-which/m-p/420882#M280663</link>
      <description>What version are you on?&lt;BR /&gt;If 9.3 or above you are most likely to have Environment Manager that via agents can collect this information for you.</description>
      <pubDate>Wed, 13 Dec 2017 16:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-from-an-array-of-grid-amp-LASR-unix-boxes-which/m-p/420882#M280663</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-12-13T16:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I specify from an array of grid &amp; LASR unix boxes which one I want to us for an X com</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-from-an-array-of-grid-amp-LASR-unix-boxes-which/m-p/421150#M280664</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's the most elegant solution I could find, but I'll have a look at these agents. We're on 9.4_M3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 12:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-specify-from-an-array-of-grid-amp-LASR-unix-boxes-which/m-p/421150#M280664</guid>
      <dc:creator>_Dan_</dc:creator>
      <dc:date>2017-12-14T12:01:24Z</dc:date>
    </item>
  </channel>
</rss>

