How to get the information from /proc/files from within a kernel module?

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

 



Hi all,

I want process related information like rss.(we can get this by doing cat /proc/<pid>status) Is there a way to get this from within a kernel module? I checked out the sources on /proc filesystem. They all show how to create, read, write a new proc file. But I want to read from an existing proc file specifically /proc/<pid>/status

I could not find rss info of a process from its task struct in kernel version 3.10.

I tried to look inside kernel to know how and where are these values (rss and all) are calculated by kernel. But I could not track it.

Can anyone please point me to either resources or guide me to accomplish the task of reading information from /proc/files...

I looked up call_usermodehelper but did not find it useful for my need.

Thanks !
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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