Skip navigation.
Home
The QNX Community Portal

View topic - PId from a process name

PId from a process name

Read-only archive of qnx.rtos (Writing resources managers, and general discussion around the QNX Neutrino RTOS) at inn.qnx.com

PId from a process name

Postby sabtain » Fri Nov 16, 2007 9:30 pm

Is it possible to find out the pid of a process using process name?
sabtain
 

RE: PId from a process name

Postby maschoen » Sun Nov 18, 2007 1:12 am

Approximately
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Re: PId from a process name

Postby Colin Burgess » Sun Nov 18, 2007 2:24 am

Take a look at the source to slay or pidin. Basically you will have to traverse

/proc/[0-9]*/as with readdir and then issue a DCMD_PROC_MAPDEBUG_BASE devctl on each
to fetch out the name.

sabtain wrote:
Is it possible to find out the pid of a process using process name?



--
cburgess@qnx.com
Colin Burgess
 

Re: PId from a process name

Postby sabtain » Mon Nov 19, 2007 6:25 pm

I have the process names, I need PID


"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fho7ht$rap$1@inn.qnx.com...
Take a look at the source to slay or pidin. Basically you will have to
traverse

/proc/[0-9]*/as with readdir and then issue a DCMD_PROC_MAPDEBUG_BASE
devctl on each
to fetch out the name.

sabtain wrote:
Is it possible to find out the pid of a process using process name?

--
cburgess@qnx.com
sabtain
 

Re: PId from a process name

Postby Colin Burgess » Mon Nov 19, 2007 6:30 pm

Unfortunately you have to go through every pid, fetch it's name, and check to see if
it matches the name you already have. That is what slay and pidin do.

sabtain wrote:
I have the process names, I need PID


"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fho7ht$rap$1@inn.qnx.com...
Take a look at the source to slay or pidin. Basically you will have to
traverse

/proc/[0-9]*/as with readdir and then issue a DCMD_PROC_MAPDEBUG_BASE
devctl on each
to fetch out the name.

sabtain wrote:
Is it possible to find out the pid of a process using process name?
--
cburgess@qnx.com



--
cburgess@qnx.com
Colin Burgess
 


Return to qnx.rtos

Who is online

Users browsing this forum: No registered users and 3 guests