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.
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).
@Kurt_Bremser: 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?
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.