Re: /proc/kcore size incorrect ?

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

 



On 10/24/05, J.A. Magallon <[email protected]> wrote:
> On Mon, 24 Oct 2005 00:13:44 +0100, Jon Masters <[email protected]> wrote:
>
> > On 10/23/05, J.A. Magallon <[email protected]> wrote:
> >
> > > BTW, any simple method to get the real mem of the box ?
> >
> > This is a typical example of using a hammer to crack a nut aka
> > modifying the kernel before giving up on userspace.

> Who talks about modifying anything ?

Your message implied that /proc/kcore needed "fixing" for your
particular application. Perhaps I missunderstood though.

> >     * man -k memory
> >
> > Leading to:
> >
> > * free(1):
> >     ``free  displays the total amount of free and used physical and swap''
> >
> > * Or /proc/meminfo (both the same thing) - which you can trivially
> > parse using sed:
> >
> > cat /proc/meminfo | sed -n -e "s/^MemTotal:[ ]*\([0-9]*\) kB\$/\1/p"

> Do your homework.

I did, thanks!

> free gives the free amount of memory _available for the user_, ie, the
> full memory of the box minus the kernel reserved part.

If you can't use the memory, what's the point in reporting it? If
you're really bothered, parse the dmesg output.

> It looks really silly to have a motd say "wellcome to this box, it has
> 2 xeons and 1022 Mb of RAM".

Yes it does. Showing off specs like that (and in your signature) went
out of fashion a while ago :-)

Jon.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux