2000-12-10 11:41:22

by David D.W. Downey

[permalink] [raw]
Subject: No shared memory??


OK, got a tiny little bug here.

When running top, procinfo, or free I get 0 for Shared memory. Obviously
this is incorrect. What has changed from the 2.2.x and the 2.4.x that
would cause these apps to misreport this information.

This IS information gained through the /proc filesystem which is kernel
based is it not? This would seem to make it a kernel issue since the
change in format is brought about by how the kernel reports this
information if i understand this correctly.

(If I am wrong, please let me know. I hate laboring under false
assumptions)


How do I fix this problem in any event?


David PGPKeys Downey



2000-12-11 00:29:08

by J.A. Magallon

[permalink] [raw]
Subject: Re: No shared memory??


On Sun, 10 Dec 2000 12:11:14 David D.W. Downey wrote:
>
> OK, got a tiny little bug here.
>
> When running top, procinfo, or free I get 0 for Shared memory. Obviously
> this is incorrect. What has changed from the 2.2.x and the 2.4.x that
> would cause these apps to misreport this information.
>

Have you mounted /dev/shm (shared memory) filesystem ?
Take a look at kernel documentation under linux/Documentation/Changes.

--
Juan Antonio Magallon Lacarta #> cd /pub
mailto:[email protected] #> more beer

Linux werewolf 2.2.18-pre25-vm #4 SMP Fri Dec 8 01:59:48 CET 2000 i686

2000-12-11 09:23:19

by David D.W. Downey

[permalink] [raw]
Subject: Re: No shared memory??

Yeah I just read that. Thanks for the info. Knew nothing about it being
kicked out there. I usually only read looking for package locations of
needed software to run the kernels. Now it looks like I should be reading
more. Thanks for the blow to the head to get me thinking right again. :)

BTW, I have that mounted now like the docs say but I still do not get any
shared info. I've gotten a couple of other emails about it, one of which
states that it ate up too much CPU time.

What I'm wondering is, is it possible to get that info some other way? I
realize walking the process tree is a pain in the ass and expensive CPU and
time wise. Also, I'm not sure if that information would include each
process's private memory space.

The reason I'm asking is that taking the overall memory used, subtracting
the cached and buffered memory may not always leave the right amount of
shared memory.

(If I show 26MB used total, 21MB which is cached and 1MB that's buffered is
it a FACT that the remaining 4MB unaccounted for is actually and completely
shared memory?)

Any other information on this would be appreciated.

TO THE KERNEL DEVELOPERS
=========================
BTW, I love the devfs stuff. REALLY makes s big difference. I'm developing
my own flavor of linux and it's quickly being modified to use ONLY devfs
entries.


>
> On Sun, 10 Dec 2000 12:11:14 David D.W. Downey wrote:
> >
> > OK, got a tiny little bug here.
> >
> > When running top, procinfo, or free I get 0 for Shared memory. Obviously
> > this is incorrect. What has changed from the 2.2.x and the 2.4.x that
> > would cause these apps to misreport this information.
> >
>
> Have you mounted /dev/shm (shared memory) filesystem ?
> Take a look at kernel documentation under linux/Documentation/Changes.
>
> --
> Juan Antonio Magallon Lacarta #> cd /pub
> mailto:[email protected] #> more beer
>
> Linux werewolf 2.2.18-pre25-vm #4 SMP Fri Dec 8 01:59:48 CET 2000 i686
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> Please read the FAQ at http://www.tux.org/lkml/
>

2000-12-11 14:56:27

by Christoph Rohland

[permalink] [raw]
Subject: Re: No shared memory??

"David D.W. Downey" <[email protected]> writes:

> When running top, procinfo, or free I get 0 for Shared memory. Obviously
> this is incorrect. What has changed from the 2.2.x and the 2.4.x that
> would cause these apps to misreport this information.

Known 2.4 behaviour. It is simply to costly to calculate that. It will
always show as 0.

Christoph