BookmarkSubscribeRSS Feed
Fluorite | Level 6

Hello Experts,


Hope you are doing good

Am actually new to SAS 9.4 and it is run on a AIX platform.

Wanted to know the best AIX command to find SAS 9.4 Ghost or Zombie or Defunct session on the AIX machine so that we can kill them.

Can anyone please help?


Thanking you in advance



Obsidian | Level 7


it might help if you explain what type of 'session' -- SAS EG sessions, batch jobs, interactive SAS sessions?

Fluorite | Level 6
yes we have batch jobs, users EG sessions and also interactive sas sessions. I was thinking of something like this:
ps aux | awk {'print $2'}|grep "defunct" |grep sas
ps aux | awk {'print $2'}|grep Z |grep sas
Fluorite | Level 6
Thanks Kurt. Idea here is find all SAS zombies/ghost/defunct processes for kill. I was thinking of something like that:
ps aux | awk {'print $2'}|grep "defunct" |grep sas
ps aux | awk {'print $2'}|grep Z |grep sas

I don't know if that will be OK
Super User

You need to first find a real appearance of what you define as "ghost process", and then create a suitable identifying pattern for the grep. I don't think that the intermediate awk is necessary.


It has been a very long time now that I found real "defunct" remnants of SAS processes in the AIX process list; defunct means a process has terminated and the parent process doesn't acknowledge this.

Super User

And yes, a "defunct" process cannot be killed, because that already happened. "defunct" means that only the entry in the process list remains because the termination has not been picked up (through a wait() call) by the parent process. Sometimes, sending a kill -1 to the parent process works, but such a situation usually points to a code issue in the parent (e.g. the SAS object spawner).

By killing/terminating the parent, the system init process takes over all its children and will remove them after receiving the -1 signal (kill -1 1). If that also fails, a system reboot is in order. Although I haven't seen that happening for a long time now (>10 years, not with AIX 6/7 and SAS 9.2 and above)

Meteorite | Level 14

Your question is "Wanted to know the best AIX command to find SAS 9.4 Ghost or Zombie or Defunct session on the AIX machine so that we can kill them".
The system administrator cannot kill the Zombie process. They are removed by the parent process or the OS.
You can however kill the parent process. If the number of Zombies is high or parent cannot be killed then reboot is the option.
The Unix/AIX Admin of your installation  is the appropriate resource to reach out to.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1 like
  • 4 in conversation