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.
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.