<?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 Re: How to get IP Address of EG Client on SAS Server? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273524#M18972</link>
    <description>&lt;P&gt;You can find these informations in the ObjectSpawner log.&lt;/P&gt;
&lt;P&gt;Logon creates messages of the type&lt;/P&gt;
&lt;P&gt;"New client connection (&lt;EM&gt;number&lt;/EM&gt;) accepted from server port &lt;EM&gt;serverport&lt;/EM&gt; for user &lt;EM&gt;user&lt;/EM&gt;. ..... &amp;nbsp;Peer IP address and port are [::ffff:&lt;EM&gt;ip_address_v4&lt;/EM&gt;]:&lt;EM&gt;clientport&lt;/EM&gt;."&lt;/P&gt;
&lt;P&gt;"Created process &lt;EM&gt;processnumber&lt;/EM&gt; for user &lt;EM&gt;user&lt;/EM&gt; (child id&lt;EM&gt; childid&lt;/EM&gt;)."&lt;/P&gt;
&lt;P&gt;Termination creates a message&lt;/P&gt;
&lt;P&gt;"Process &lt;EM&gt;processnumber&lt;/EM&gt; for user &lt;EM&gt;user&lt;/EM&gt; (child id &lt;EM&gt;childid&lt;/EM&gt;) has ended."&lt;/P&gt;
&lt;P&gt;All messages start with a timestamp, user, processnumber and childid can be used to connect start and termination of sessions.&lt;/P&gt;</description>
    <pubDate>Fri, 27 May 2016 08:40:48 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-05-27T08:40:48Z</dc:date>
    <item>
      <title>How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273521#M18971</link>
      <description>&lt;P&gt;Hi, all&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I want to record the information of EG user who logging on SAS Server, including the logging datetime, sas user name, client machine's name, client machine's IP address.&amp;nbsp;So my solution is add code in the file: "C:\SAS\EMiner\Lev1\SASApp\appserver_autoexec_usermods.sas" on the server machine.&lt;/P&gt;
&lt;P&gt;And I can get the sas user name from macro varialbe "SYSUSERID", client machine's name from macro variable "_CLIENTMACHINE", but I can't get the IP Address. Where should I can get the IP Address?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And another problem, I also want to record the log off time, so when the EG user close the EG or disconnect the SASApp server, how can I know? Where I can write the sas code to record the log off information on the server machine?&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 08:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273521#M18971</guid>
      <dc:creator>Slash</dc:creator>
      <dc:date>2016-05-27T08:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273524#M18972</link>
      <description>&lt;P&gt;You can find these informations in the ObjectSpawner log.&lt;/P&gt;
&lt;P&gt;Logon creates messages of the type&lt;/P&gt;
&lt;P&gt;"New client connection (&lt;EM&gt;number&lt;/EM&gt;) accepted from server port &lt;EM&gt;serverport&lt;/EM&gt; for user &lt;EM&gt;user&lt;/EM&gt;. ..... &amp;nbsp;Peer IP address and port are [::ffff:&lt;EM&gt;ip_address_v4&lt;/EM&gt;]:&lt;EM&gt;clientport&lt;/EM&gt;."&lt;/P&gt;
&lt;P&gt;"Created process &lt;EM&gt;processnumber&lt;/EM&gt; for user &lt;EM&gt;user&lt;/EM&gt; (child id&lt;EM&gt; childid&lt;/EM&gt;)."&lt;/P&gt;
&lt;P&gt;Termination creates a message&lt;/P&gt;
&lt;P&gt;"Process &lt;EM&gt;processnumber&lt;/EM&gt; for user &lt;EM&gt;user&lt;/EM&gt; (child id &lt;EM&gt;childid&lt;/EM&gt;) has ended."&lt;/P&gt;
&lt;P&gt;All messages start with a timestamp, user, processnumber and childid can be used to connect start and termination of sessions.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 08:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273524#M18972</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-27T08:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273571#M18977</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;&amp;nbsp;answered the first part of your question and provided good clues about the second part. &amp;nbsp;For the second part you might be looking for the equivilent of t&lt;A href="http://support.sas.com/documentation/cdl/en/lesysoptsref/68023/HTML/default/viewer.htm#n0rjd82dx13qi7n1mw6rsljm7x1o.htm" target="_self"&gt;he TERMSTMT option&lt;/A&gt; -- but there isn't one. &amp;nbsp;However, there are cues in the ObjectSpawner log, ex:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Client connection 11 for user sassrv@l77841 closed.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 12:10:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273571#M18977</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-05-27T12:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273574#M18978</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Client connection 11 for user sassrv@l77841 closed.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Caution, Chris: that message comes immediately after the Workspace Server session has been started, but it does not denote it's end. That comes later in the form I mentioned.&lt;/P&gt;
&lt;P&gt;So this message is not suited to register the end of someone's workspace server activity.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 12:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273574#M18978</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-27T12:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273576#M18979</link>
      <description>&lt;P&gt;Ah, you're correct&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;! The ObjectSpawner's job is to authenticate and launch the sas.exe/shell script, then hand the connection over to the Workspace Server. &amp;nbsp;Then get out of the way.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 12:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273576#M18979</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-05-27T12:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273585#M18981</link>
      <description>&lt;P&gt;just for clarification.&lt;/P&gt;
&lt;P&gt;When you say "logging on/off" - to me that's not at&amp;nbsp;all equivalent when there are workspace server sessions active.&lt;/P&gt;
&lt;P&gt;The logon/logoff events are better captured in the metadata sever log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And before you are digging into deep with hand written parsing, take a look&amp;nbsp;of what you can get from Environment Manager, and rather extend the capabilities there.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 14:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273585#M18981</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-05-27T14:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273912#M19016</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thanks, Chris, you always solve my problem!&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I really should invite you for&amp;nbsp;dinner.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The&amp;nbsp;TERMSTMT option does work. I run&amp;nbsp;a little test. &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Add this option in "C:\SAS\EMiner\Lev1\SASApp\sasv9.cfg" configuration file:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3386iACE2EA6DCB463E5D/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Catch.jpg" title="Catch.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I trace the WorkspaceServer log, and it did executed.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3387i677E4AD269803F91/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Catch4734.jpg" title="Catch4734.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;And the file is created:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3388iDF1919FA6EDC4109/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Catch4AF0.jpg" title="Catch4AF0.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2016 13:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273912#M19016</guid>
      <dc:creator>Slash</dc:creator>
      <dc:date>2016-05-30T13:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273915#M19017</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thankyou very much. Sorry I can only select one solution for my post.&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;It seems it's the only way can get IP Address, from the ObjectSpawner log:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3389i476BDCC0D99E82B8/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="QQ图片20160530213230.png" title="QQ图片20160530213230.png" /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2016 13:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273915#M19017</guid>
      <dc:creator>Slash</dc:creator>
      <dc:date>2016-05-30T13:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get IP Address of EG Client on SAS Server?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273995#M19020</link>
      <description>&lt;P&gt;Because I'm still using 9.3 version, there is no Environemnt Manager, so I must done it by myself.&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 00:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-IP-Address-of-EG-Client-on-SAS-Server/m-p/273995#M19020</guid>
      <dc:creator>Slash</dc:creator>
      <dc:date>2016-05-31T00:56:00Z</dc:date>
    </item>
  </channel>
</rss>

