LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-17-2007, 07:00 AM   #1
chessi
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Rep: Reputation: 0
Obtaining Process Name in Kernel Space


Hi All

I have a situation where I have a kernel module loggging in the description of the user processes calling the module.
The Information expected to be logged include: Process ID, Process description/name, etc....

I have no issues with the other data, but am stuck with regards to Process description/name. This data field is essential since Process ID being dyanamic doesnt give me any forthright useful info as to which user level module called my module.

Referring to the Rubini booked yielded this: char comm[] array in task_struct carries the Process description. But I could not get further details on this array: Who updates this, is the user space supposed to give an input for this, is this a compulosory field, or only some processes have an entry in this array, etc...

So,
1.Could anyone please clarify on the status of the comm[] array, or any other better alternative to Log the process name.
2.Which ID is better: pid or tgid.

I am a Kernel newbie, and I am finding it tough to get a standard set of Kerenl APIs etc. For ex: there is no documentation in the kerenel regarding many semaphore APIs like: down_interruptible or variable description of variables like comm[] even though it is present in an important structure like task_struct. So where can I find good documentation/description of Kernel Structures, Variables and APIs.

Thanks a lot for your patience and for the help.

Last edited by chessi; 04-17-2007 at 07:06 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send events from kernel module to user space process yugandhar Linux - Kernel 2 02-21-2011 10:39 AM
maximun address space for a process sarunya Linux - General 1 08-30-2005 10:56 AM
Per-process address space in x86_64? geezjan Red Hat 1 04-07-2005 04:57 AM
obtaining kernel header files. levicc00123 Linux - Software 2 11-22-2004 02:15 PM
accessing process address space linorg Programming 5 04-15-2004 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration