getting processs name


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users getting processs name
# 1  
Old 03-08-2006
getting processs name

hi,
by getpid() i will get the pid of the current process.
but how do get the name of this process...
or instead from pid how do i get process name...
is there any way...
thanks in advance....
# 2  
Old 03-08-2006
i am not sure of the mapping between process nos and process names

but there is anyway argv[0] !!!

but there are libraries in perl to access process table information
Package: libproc-process-perl (0.39-1)
# 3  
Old 03-08-2006
You never mentioned which OS you are on. For a /proc based OS, see this - get process name from pid - getcommandline
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Solaris

Increase processs priority and affinity in Solaris

I want to know how can in Solaris i can: >Set Process priority to maximum >Set Process Affinity. Linke in windows task manager we can set process priority to following levels: Low, Below Normal,Normal , Above Normal , High , Realtime And we can set process affinity to run on all processors.... (10 Replies)
Discussion started by: mr_os
10 Replies

2. Solaris

understanding the processs

i have a process with the question mark and started on 22 jan.. does this mean it is a zombie process. there are no connecting or child processes... oracle 17546 1 0 Jan 22 ? 0:00 oracleprod2 (LOCAL=NO) please help.. (1 Reply)
Discussion started by: sudhiroracle
1 Replies
Login or Register to Ask a Question