/proc/kcore size incorrect ?
From: J.A. Magallon (jamagallon_at_able.es)
Date: 10/23/05
- Previous message: Andrew Morton: "Re: [PATCH 7/9] mm: split page table lock"
- Next in thread: Jon Masters: "Re: /proc/kcore size incorrect ?"
- Reply: Jon Masters: "Re: /proc/kcore size incorrect ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 23 Oct 2005 23:58:06 +0200 To: "Linux-Kernel, " <linux-kernel@vger.kernel.org>
Hi all...
Probably this is a stupid question, but anyways...
I'm trying to make a script to generate an /etc/motd, and I wanted to
include memory size of the box.
I tried:
echo $(($(stat -c %s /proc/kcore) / 1024 / 1024)) "Mb"
but it gives 1022 for a 1Gb box.
In fact:
werewolf:~# ll /proc/kcore
-r-------- 1 root root 1072566272 2005.10.23 23:53 /proc/kcore
werewolf:~# stat -c %s /proc/kcore
1072566272
werewolf:~# echo $((1024*1024*1024))
1073741824
Why that difference ?
TIA
BTW, any simple method to get the real mem of the box ?
-- J.A. Magallon <jamagallon()able!es> \ Software is like sex: werewolf!able!es \ It's better when it's free Mandriva Linux release 2006.1 (Cooker) for i586 Linux 2.6.13-jam9 (gcc 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- application/pgp-signature attachment: signature.asc
- Previous message: Andrew Morton: "Re: [PATCH 7/9] mm: split page table lock"
- Next in thread: Jon Masters: "Re: /proc/kcore size incorrect ?"
- Reply: Jon Masters: "Re: /proc/kcore size incorrect ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|