01-03-2017 03:00 AM
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.
01-03-2017 05:27 AM
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).
01-03-2017 05:57 AM - edited 01-03-2017 05:58 AM
@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?
01-03-2017 08:51 AM
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.