From: "J.A. Magallon" <jamagallon@able.es>
To: "Linux-Kernel, " <linux-kernel@vger.kernel.org>
Subject: /proc/kcore size incorrect ?
Date: Sun, 23 Oct 2005 23:58:06 +0200 [thread overview]
Message-ID: <20051023235806.1a4df9ab@werewolf.able.es> (raw)
[-- Attachment #1: Type: text/plain, Size: 873 bytes --]
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))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2005-10-23 21:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-23 21:58 J.A. Magallon [this message]
2005-10-23 23:13 ` /proc/kcore size incorrect ? Jon Masters
2005-10-23 23:57 ` J.A. Magallon
2005-10-24 12:02 ` Jon Masters
2005-10-24 14:19 ` Stefan Smietanowski
2005-10-25 12:04 ` Matan Peled
2005-10-25 13:37 ` Brian Waite
2005-10-25 16:02 ` /proc/kcore size incorrect ? (OT) Eric Piel
2005-10-25 16:06 ` J.A. Magallon
2005-10-25 18:04 ` Tony Luck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051023235806.1a4df9ab@werewolf.able.es \
--to=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.