AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  kill processes

    Posted Wed October 11, 2006 04:10 AM

    Originally posted by: SystemAdmin


    Dear,

    i have java program running AIX 5L, when i start the program, it will have a process ID for the java.exe and gen some process ID for the program process. When i kill the porgram (java.exe). Only the java.exe process ID will close. Another program ID can't be close. How can I kill all the the program ID by script or by program? because the program ID is gen by ramdom.

    TKS


  • 2.  Use the parent PID

    Posted Wed October 11, 2006 05:52 AM

    Originally posted by: nagger


    If you use: ps -f
    You can find out how the processes are related to each other via the PPID column = parent PID.

    So find out all the children of your Java program and then kill them too.
    If you write a shell script to do this be very careful while testing it :-)