Re: reading /proc values thorugh C code
- From: John McCallum <john.mccallum@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Feb 2008 16:05:36 +0000
Hiya,
uday kiran wrote:
I have been looking for quite some time to read /proc entries through
a c code. I understand that there are directories with pids. If there
is a library or a kernel structure that lets us to do so. Please let
me know.
There is nothing special about the /proc filesystem from a user code
perspective. You should be able to use the normal open(), read() & close()
operations. In fact you can just 'cd' there and type 'ls' or 'more' and so
on.
Or are you looking for a library that parses the contents of these files?
From the kernel you can just create a proc filesystem entry withcreate_proc_read_entry() and associate your generator function at that
point.
Hope that helps,
John McCallum,
Edinburgh
.
- References:
- reading /proc values thorugh C code
- From: uday kiran
- reading /proc values thorugh C code
- Prev by Date: Re: how to recovry /dev/null
- Next by Date: ALSA PCM play one small problem
- Previous by thread: reading /proc values thorugh C code
- Next by thread: Re: reading /proc values thorugh C code
- Index(es):