From: Bill Waddington on
On Sun, 31 Jan 2010 10:13:40 -0600, John Hasler <jhasler(a)newsguy.com>
wrote:

>J G Miller writes:
>> So perhaps the question comes down to, how does one locate the
>> absolution position of data for /proc in the memory used by the
>> system?
>
>procfs is a virtual filesystem: the data is assembled "on the fly" from
>various kernel data structures when the files are read.


Maybe they/he will listen to you. Other attempts to explain this have
fallen on deaf ears. I'm thinking of typing it again in ALL CAPS.

http://www.xml.com/ldd/chapter/book/ch04.html
http://www.linuxjournal.com/article/8381

and so on...

Bill
--
William D Waddington
william.waddington(a)beezmo.com
"Even bugs...are unexpected signposts on
the long road of creativity..." - Ken Burtch
From: J G Miller on
On Sun, 31 Jan 2010 08:46:10 -0800, Bill Waddington wrote:

> Maybe they/he will listen to you. Other attempts to explain this have
> fallen on deaf ears. I'm thinking of typing it again in ALL CAPS.
>
> http://www.xml.com/ldd/chapter/book/ch04.html
> http://www.linuxjournal.com/article/8381

Yes that does indeed explain how to read /proc from within a Linux
Operating System, but I think that program which is going to display
the information from /proc is not running on a Linux system and is not
even necessarily running on a 386 architecture.
From: John Hasler on
J G Miller writes:
> ...I think that program which is going to display the information from
> /proc is not running on a Linux system and is not even necessarily
> running on a 386 architecture.

That may be true but the point is that the contents of /proc do not
exist as a preformatted data structure to be grabbed from a convenient
location in /dev/kmem.

--
John Hasler
jhasler(a)newsguy.com
Dancing Horse Hill
Elmwood, WI USA
From: Lew Pitcher on
On January 31, 2010 12:52, in comp.os.linux.misc, miller(a)yoyo.ORG wrote:

> On Sun, 31 Jan 2010 08:46:10 -0800, Bill Waddington wrote:
>
>> Maybe they/he will listen to you. Other attempts to explain this have
>> fallen on deaf ears. I'm thinking of typing it again in ALL CAPS.
>>
>> http://www.xml.com/ldd/chapter/book/ch04.html
>> http://www.linuxjournal.com/article/8381
>
> Yes that does indeed explain how to read /proc from within a Linux
> Operating System, but I think that program which is going to display
> the information from /proc is not running on a Linux system

In which case, there's no point in looking for "in memory" buffers, is
there?

If the program that's going to display the data isnt running on Linux, then
it has no access to whatever buffers the linux kernel keeps. That data is
only available within an executing Linux environment.

Remember, the data externalized by /proc is created *only* when some
userland app reads a /proc file. It doesn't exist in a buffer anywhere;
the /running/ Linux kernel intercepts such read syscalls, and invokes
kernel callback functions to create the data on the fly. There's
no "permenant media" to read from, just the running Linux kernel. There's
no "kernel buffer" to locate, just a bunch of callbacks in a running Linux
kernel.

> and is not
> even necessarily running on a 386 architecture.

So, unless the OP is willing to read /proc (even by way of a client-server
sort of application-level architecture), he's out of luck. His only way
into the data that /proc provides is through read syscalls against /proc
files in a running Linux system.


--
Lew Pitcher
Master Codewright & JOAT-in-training | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
---------- Slackware - Because I know what I'm doing. ------


From: unruh on
On 2010-01-31, J G Miller <miller(a)yoyo.ORG> wrote:
> On Sun, 31 Jan 2010 08:46:10 -0800, Bill Waddington wrote:
>
>> Maybe they/he will listen to you. Other attempts to explain this have
>> fallen on deaf ears. I'm thinking of typing it again in ALL CAPS.
>>
>> http://www.xml.com/ldd/chapter/book/ch04.html
>> http://www.linuxjournal.com/article/8381
>
> Yes that does indeed explain how to read /proc from within a Linux
> Operating System, but I think that program which is going to display
> the information from /proc is not running on a Linux system and is not
> even necessarily running on a 386 architecture.

Then what has /proc to do with anything. /proc is a filesystem on a
Linux system. (It does not matter what architecture-- it is there on any
Linux machine, but it is linux).