command line arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I have a question about how to get command line arguments from 
kernel data structs...
We have a loadable kernel module which can be used for thread CPU
profiling etc.. Currently we can retrieve the program name from the
field "char comm[16]" in task_struct. Unfortunately a jave program
runs in its interpreted mode as "java HelloWorld" and so we can
only get the word "java" from comm[16], not the program name 
"HelloWorld".

Where in the kernel structs can one retrive the arguments? We 
understand that /proc/pid/cmdline has the arguments (and is used by
tools like "top" or "ps"), and so it seems that arguments come
from somewhere in the kernel.

Thanks for your help,
Charles
-- 
H. Charles Tang
(630) 713-8995
http://ihgpweb.ih.lucent.com/~htang/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux