Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Help writing a ksh script on AIX box.

Avatar of AIX25
AIX25Flag for United States of America asked on
Unix OSShell Scripting
58 Comments1 Solution1118 ViewsLast Modified:
I need help to write a ksh script.

Users log on to a pc and open up a Reflection X sessions that talks to the AIX box and opens up a process for every user that runs this. Reflection X is a x-windows session.

Sample output:

rs3147:/> ps -ef |grep CATSTAR2
  c36787 368886 110636   0 14:07:24  pts/5  0:00 /usr/catia425/v425/code/steplib/CATSTAR2 CATIA 64 0 0 0
  c52077 421934 520350   0 14:02:35  pts/4  0:13 /usr/catia425/v425/code/steplib/CATSTAR2 CATIA 64 0 0 0
  c52193 434176  69862   0 08:11:10  pts/0  0:01 /usr/catia425/v425/code/steplib/CATSTAR2 CATIA 64 0 0 0

The problem is that when users logs off, it sometimes leaves those sessions running, and it inherits Parent ID of "0". I need help to create scripts that will go out and check to see if there is any processes running similar to the ones in the sample output above. But, I only want the script to kill the processes with a Parent ID of "0". I do not want to kill active processes.

Please help and reply back with any questions or more information needed.

Thank you