Hareesh Nagarajan wrote:
Hi,Any idea how I can get the process name from the pid from within the kernel? Is there a function that does this?
Use find_task_by_pid(pid) which returns a pointer to the task_struct. The comm field of the task_struct gives the name of the process.
Thanks hareesh! ;) -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/