Process Id

ank9
ank9 used Ask the Experts™
on
Please refer to the attached screenshot.

I need to kill some of the processes on Solaris. Please let em know which are the process id. the first column or the second column
ProcessId.JPG
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2007

Commented:
The process id (PID) is the second column.
Top Expert 2007
Commented:
The first column is the owner (username) of the process

Author

Commented:
that means for first process 26036 os the process id. Can you please let me know what is the third column (26017)
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Top Expert 2007

Commented:
The 3rd field is titled C and the man page says:

" C    (f,l)
           Processor utilization for scheduling  (obsolete).  Not
           printed when the -c option is used."
Distinguished Expert 2017
Commented:
ps -ef | more.
The first row provides the column headings.
The third column is the process ID of the parent (program that started the program referenced in the second column).
program a (parent) PID 26017
Program b (child) PID 26036
user 26017 [parent PID] nice_level time_started terminal program a
user 26036 26017 nice_level time_started terminal program b

Author

Commented:
so, does that mean "child" is the process id that I need to kill?
I need to do

kill -9 26036

Is that correct?

Thank you
Top Expert 2007

Commented:
yes, you need to kill the child (PID) not the parent process (PPID)
Distinguished Expert 2017

Commented:
It all depends on what you want to do.
If you have are trying to terminate a process and it has child processes, you should kill the child processes first and then the parent process to avoid having orphane/zombie processes. At times when the parent process is externally terminated, the child process may not be terminated as well and will hang around with init (1) as the parent. This may interfere with your system if the previously terminated parent process is ever restarted and the child process runs into trouble because a version of it  (an orphan) is still around.

Before using the -9 flag with the kill, you should use the -TERM (-15). TERM is more graceful and lets the process cleanup after itself. The -9 will force the process to exist and may leave certain things around.  The impact will depend on how the program is written/handled.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial