[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] raq4 memory problem...
- Subject: Re: [cobalt-developers] raq4 memory problem...
- From: "John P. Looney" <valen@xxxxxxxxxx>
- Date: Fri Aug 16 07:18:59 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
On Fri, Aug 16, 2002 at 09:22:02AM -0400, njd76 mentioned:
> I have this same problem after I installed the Hardening Pkg and MySQL.
> I just added another 128 and I am getting the same problem it still
> brings me to 6k of memory! Then when I go to the GUI interface it has
> completely different numbers!!!
Ah. On linux, 'free' RAM is wasted ram. Linux uses spare ram for
buffering disk access and caching network traffic etc.
This is a nice little script I use in conjunction with ucd-snmp and Cacti
to monitor real free ram.
It should be noted that this will produce a negative answer if you are
using swap more than buffers/cache. Linux will swap out programs that
don't run, so it can use that program RAM for caching disk access!
#!/bin/sh
physical=`grep Mem: /proc/meminfo | awk '{print $2}'`
used=`grep Mem: /proc/meminfo | awk '{print $3}'`
buffers=`grep Mem: /proc/meminfo | awk '{print $6}'`
cache=`grep Mem: /proc/meminfo | awk '{print $7}'`
swapused=`grep Swap: /proc/meminfo | awk '{print $3}'`
echo "$physical - $used + $cache + $buffers - $swapused" | bc
John