DATA Step, Macro, Functions and more

SAS Process running on UNIX

Reply
Contributor
Posts: 65

SAS Process running on UNIX

Hi,

 

I am using tcpunix.scr file to connect to the UNIX server. After the session gets established, a unix job starts running which looks something like:-

 

userid 27949 28760  0 02:32:40 ?         0:00 /opt/sas/sas9.3ts1m2/SASFoundation/9.3/sasexe/sas -dmr -comamid tcp -noterminal -nosyntaxcheck -news 

 

In some scenarios these jobs keeps running even after signing off and closing the SAS session.Please suggest the scenarios of these orphan jobs.

Super User
Posts: 6,930

Re: SAS Process running on UNIX

You might have a broken TCP/IP connection before the signoff, or the client SAS session terminated in a non-graceful way, preventing a proper signoff.

I routinely scan for CONNECT server sessions that have a parent process ID of 1 (meaning that the telnetd terminal server part has closed, signifying a lost telnet connection) and kill them (superuser privilege needed).

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 65

Re: SAS Process running on UNIX

[ Edited ]

@KurtBremser: Thanks for your reply. Could you please provide more information on the below part :-

CONNECT server sessions that have a parent process ID of 1 (meaning that the telnet terminal server part has closed, signifying a lost telnet connection)

 

Also, is there a scenario to replicate this?

Super User
Posts: 6,930

Re: SAS Process running on UNIX

In your output of the ps command, the third column (the second number) is the PPID. Typically, this would be the shell from which SAS was started. If the terminal connection is lost, this number changes to 1.

But this is true only for connections that use telnet. With a Connect Spawner, you will probably need another mechanism to detect orphaned connect sessions.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 3 replies
  • 182 views
  • 0 likes
  • 2 in conversation