![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| finding Background Process Id | krk_555 | Shell Programming and Scripting | 4 | 10-24-2007 05:34 PM |
| Finding out process id in a scipt | vibhor_agarwali | UNIX for Dummies Questions & Answers | 2 | 04-12-2007 05:30 AM |
| finding idle time of a process | Krrishv | Shell Programming and Scripting | 36 | 01-10-2007 06:34 AM |
| finding a process running on a port | manduva | UNIX for Advanced & Expert Users | 8 | 02-12-2004 03:49 AM |
| Finding Out When A Process Has Finished? | 1cuervo | UNIX for Advanced & Expert Users | 5 | 11-02-2001 02:59 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
finding process id
is there a way to find the process id of a process because i have same process invoked several times.
when i need to kill them, i get confused with the id. Thanks, sskb |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
best way if you can do ps -aux im sure the process name that you are running. If you can try ps --username for the current process that you execute, by this way you have a idea on which process can be killed, rather then confused of all the systems process. One more suggestion ps -eo "%p" actually it will lists out the normal default output and easy for you to kill (works on AIX havent try on any other OS's) Give a try post back if this doesnt help..
|
|
#3
|
|||
|
|||
|
hi killerserv,
thanks for ther response, but i think i need to explain more.. well, I am using a HP Unix system. and I generally use ps -u username and try that.. but when i have a number of same processes and i want to kill only one of them.. such as i have 4 netscapes running out of which i need to kill one.. i do not know which id corresponds to which process.. like...... $ps -u username | grep netscape 3598 pts/1 0:00 netscape 4561 ? 0:00 netscape 3596 pts/1 4:07 netscape 4560 ? 1:31 netscape 3794 ? 3:34 netscape 3795 ? 0:00 netscape now is there a way to identify that from the netsacpe itself? thanks, sskb |
|
#4
|
||||
|
||||
|
Well, you could use ps -ef, which shows the parent process id as well, and check to see who (or what) started it.
|
|
#5
|
|||
|
|||
|
Hi LivinFree,
I tried ps -ef |grep netscape sskb 2430 2429 0 22:55:51 ? 1:35 /usr/local/netscape/netscape sskb 2508 2507 0 23:14:39 ? 0:09 /usr/local/netscape/netscape but i do not get anything like the window id..(if there is one).. so that i can know what i need. well, is there any utility which can give the status of a window along with process id.. i think this would be a great help. Thanks, sskb |
|
#6
|
|||
|
|||
|
In your example 'ps -ef | grep netscape' resulted in:
sskb 2430 2429 0 22:55:51 ? 1:35 /usr/local/netscape/netscape sskb 2508 2507 0 23:14:39 ? 0:09 /usr/local/netscape/netscape In the first line, the PID 2430 represents the PID of the running task 'netscape'. Now if you do a ps on the Parent PID (PPID): ps -ef | grep 2429 you'll find the owner of the task netscape. -mk
__________________
If it aint broke, Fix it till it is. |
|
#7
|
|||
|
|||
|
hi Mike,
I get your point.. but I need to correlate between the process id and the process window. let me know if that isn't making sense, Regards, sskb |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|