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:
signature.asc
Description: PGP signature
- Follow-Ups:
- Re: /proc/kcore size incorrect ?
- From: Jon Masters <[email protected]>
- Re: /proc/kcore size incorrect ?
- Prev by Date: Re: [PATCH 7/9] mm: split page table lock
- Next by Date: Re: BUG in the block layer (partial reads not reported)
- Previous by thread: [patch -mm] drivers/edac: updates .owner field of struct pci_driver
- Next by thread: Re: /proc/kcore size incorrect ?
- Index(es):