From: Robert Heller on
At Mon, 1 Feb 2010 18:41:19 +0000 spike1(a)freenet.co.uk wrote:

>
> And verily, didst Tauno Voipio <tauno.voipio(a)notused.fi.invalid> hastily babble thusly:
> > unruh wrote:
> >> On 2010-02-01, peter <cmk128(a)gmail.com> wrote:
> >>> I am here, I posted a post a few days ago.
> >>>
> >>> Thanks for the replies. I guess I have no way to read the /proc from
> >>> outside. May be i need to write a agent that run inside the linux,
> >>> then read the information from it from outside.
> >>> thanks
> >>> from Peter
> >>
> >> Maybe if you told us what it is that you really want to do someone could
> >> give some useful advice. I do not know what "read the /proc from
> >> outside" could mean. /proc only exists if the linux kernel is running.
> >> If it is not running, it does not exist, and there is nothing to read.
> >> What does "from the outside" mean? How would you imagine being able to
> >> read kernel things "from the outside" and at the same time not being
> >> able to read /proc as a filesystem?
> >
> >
> > It seems that the OP is running a virtual machine or debugger,
> > and he is interested to look at /proc entries without running
> > the target system.
> >
> I think he wants to read them from the running system from OUTSIDE the
> virtual machine... for some peculiar reason.

Maybe he wants to avoid killing the perverbial cat? :-) I think the
whole point of Quantum Machanics and the Uncertainity Principle is that
you can't do that. (Sorry -- I just finished reading "A brief History
Of Time" by Stephen Hawkings.)


--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/

From: Tauno Voipio on
Robert Heller wrote:
> At Mon, 1 Feb 2010 18:41:19 +0000 spike1(a)freenet.co.uk wrote:
>
>> And verily, didst Tauno Voipio <tauno.voipio(a)notused.fi.invalid> hastily babble thusly:
>>> unruh wrote:
>>>> On 2010-02-01, peter <cmk128(a)gmail.com> wrote:
>>>>> I am here, I posted a post a few days ago.
>>>>>
>>>>> Thanks for the replies. I guess I have no way to read the /proc from
>>>>> outside. May be i need to write a agent that run inside the linux,
>>>>> then read the information from it from outside.
>>>>> thanks
>>>>> from Peter
>>>> Maybe if you told us what it is that you really want to do someone could
>>>> give some useful advice. I do not know what "read the /proc from
>>>> outside" could mean. /proc only exists if the linux kernel is running.
>>>> If it is not running, it does not exist, and there is nothing to read.
>>>> What does "from the outside" mean? How would you imagine being able to
>>>> read kernel things "from the outside" and at the same time not being
>>>> able to read /proc as a filesystem?
>>>
>>> It seems that the OP is running a virtual machine or debugger,
>>> and he is interested to look at /proc entries without running
>>> the target system.
>>>
>> I think he wants to read them from the running system from OUTSIDE the
>> virtual machine... for some peculiar reason.
>
> Maybe he wants to avoid killing the perverbial cat? :-) I think the
> whole point of Quantum Machanics and the Uncertainity Principle is that
> you can't do that. (Sorry -- I just finished reading "A brief History
> Of Time" by Stephen Hawkings.)


In principle, he could, by following the data structures
forming the /proc file system. The task is about the same
as digging in with kgdb - a quite desperate measure, and
it needs at least the kernel symbol table to work.

-

My lecturer of quantum mechanics (about 45 years ago) said that
if the thing does not feel weird, the student is not following.

--

Tauno Voipio

From: unruh on
On 2010-02-02, Tauno Voipio <tauno.voipio(a)notused.fi.invalid> wrote:
> Robert Heller wrote:
>> At Mon, 1 Feb 2010 18:41:19 +0000 spike1(a)freenet.co.uk wrote:
>>
>>> And verily, didst Tauno Voipio <tauno.voipio(a)notused.fi.invalid> hastily babble thusly:
>>>> unruh wrote:
>>>>> On 2010-02-01, peter <cmk128(a)gmail.com> wrote:
>>>>>> I am here, I posted a post a few days ago.
>>>>>>
>>>>>> Thanks for the replies. I guess I have no way to read the /proc from
>>>>>> outside. May be i need to write a agent that run inside the linux,
>>>>>> then read the information from it from outside.
>>>>>> thanks
>>>>>> from Peter
>>>>> Maybe if you told us what it is that you really want to do someone could
>>>>> give some useful advice. I do not know what "read the /proc from
>>>>> outside" could mean. /proc only exists if the linux kernel is running.
>>>>> If it is not running, it does not exist, and there is nothing to read.
>>>>> What does "from the outside" mean? How would you imagine being able to
>>>>> read kernel things "from the outside" and at the same time not being
>>>>> able to read /proc as a filesystem?
>>>>
>>>> It seems that the OP is running a virtual machine or debugger,
>>>> and he is interested to look at /proc entries without running
>>>> the target system.
>>>>
>>> I think he wants to read them from the running system from OUTSIDE the
>>> virtual machine... for some peculiar reason.
>>
>> Maybe he wants to avoid killing the perverbial cat? :-) I think the
>> whole point of Quantum Machanics and the Uncertainity Principle is that
>> you can't do that. (Sorry -- I just finished reading "A brief History
>> Of Time" by Stephen Hawkings.)
>
>
> In principle, he could, by following the data structures
> forming the /proc file system. The task is about the same
> as digging in with kgdb - a quite desperate measure, and
> it needs at least the kernel symbol table to work.

If he is not running Linux, there is no data structure to look at (
never mind the fact that there is no data structure to look at, because
for many of the files in /proc, the contents are manufactured when a
read request is made to that file). If a linux kernel is running, then
the /proc filesystem is, or should be there and the data can be read
from it. I am having immense difficulty in understanding what he wants.
He is either running a Linux kernel, in which case /proc is there, or he
is not, in which case the contents of /proc do not exist and make no
sense.

>
> -
>
> My lecturer of quantum mechanics (about 45 years ago) said that
> if the thing does not feel weird, the student is not following.
>
From: peter on
take a look http://peter-bochs.googlecode.com , It is a debugger, I
made it for my operating system development. I want it to support /
proc.
In my debugger, I can read anywhere in memory, I can also read the CPU
status. But I don't know where to find the /proc information in memory
(perhaps it doesn't exist in memory).

For operating system development, only reading the memory for debug is
not enough. I need to read the data-structure(data structure for
paging information, segmentation information, process information or
etc... ) of kernel. But for linux, I don't know where is those
structures in memory.

If the /proc is not hold in memory or unable to decode it. I am going
to write a small standard about "how to put and decode kernel debug
information in memory/harddisk". If your operating system is follow
this small-standard, then you can use my peter-bochs debugger to debug
your operating system in high-level way. "high-level way" mean not
just reading some bytes in memory, it means allows us to read the data
structure of your kernel in real time (forgive my bad English).

Also, I am applying a mPhil degree. If I use this as a research topic,
is it too naive?

Nice guys, thanks. Here is a good forum.
From: Robert Heller on
At Wed, 3 Feb 2010 08:47:13 -0800 (PST) peter <cmk128(a)gmail.com> wrote:

>
> take a look http://peter-bochs.googlecode.com , It is a debugger, I
> made it for my operating system development. I want it to support /
> proc.
> In my debugger, I can read anywhere in memory, I can also read the CPU
> status. But I don't know where to find the /proc information in memory
> (perhaps it doesn't exist in memory).

No, it does not.

>
> For operating system development, only reading the memory for debug is
> not enough. I need to read the data-structure(data structure for
> paging information, segmentation information, process information or
> etc... ) of kernel. But for linux, I don't know where is those
> structures in memory.

Have you looked at the kernel *source code*. To misquote Obewan Knobie:
"Use the Source, Peter". http://www.kernel.org/

>
> If the /proc is not hold in memory or unable to decode it. I am going
> to write a small standard about "how to put and decode kernel debug
> information in memory/harddisk". If your operating system is follow
> this small-standard, then you can use my peter-bochs debugger to debug
> your operating system in high-level way. "high-level way" mean not
> just reading some bytes in memory, it means allows us to read the data
> structure of your kernel in real time (forgive my bad English).
>
> Also, I am applying a mPhil degree. If I use this as a research topic,
> is it too naive?
>
> Nice guys, thanks. Here is a good forum.
>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/