- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
it might help if you explain what type of 'session' -- SAS EG sessions, batch jobs, interactive SAS sessions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ps aux | awk {'print $2'}|grep "defunct" |grep sas
ps aux | awk {'print $2'}|grep Z |grep sas
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Start with
ps -ef|pg
and look at the output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.