Hi, I have a little question about memory usage... When I do a free, I get: total used free shared buffers cached Mem: 18482800 18030668 452132 0 683068 9426792 -/+ buffers/cache: 7920808 10561992 But, when I do a ps, mysql is the only process that takes noticable memory; and it is far from 7.9GBs... USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND mysql 28346 36.0 15.6 3241196 2884692 ? Sl Jul04 981:19 \_ /usr/libexec/mysqld --basedir=/usr --datadir=/IOL/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/IOL/mysql/mysql.sock Once you removed the buffers and the cached memory from the total used memory... what is left? Looks like I have "something" (that is not buffers/cached) that takes more than 4GB... Could it be disk cache or is it included in the cached value? Any idea? Thx, JD
John Doe wrote:> > Hi, > > I have a little question about memory usage... > > When I do a free, I get:I calculate system memory usage by (total memory) - (free memory) - (cached memory) - (buffers memory) The "free" memory reported by free/top/other tools is very misleading, and is the topic of many questions over the years because of it. nate
On Monday 06 July 2009, John Doe wrote:> Hi, > > I have a little question about memory usage... > > When I do a free, I get:/proc/meminfo may give you a more detailed summary. /Peter> total used free shared buffers cached > Mem: 18482800 18030668 452132 0 683068 9426792 > -/+ buffers/cache: 7920808 10561992 > > But, when I do a ps, mysql is the only process that takes noticable memory; > and it is far from 7.9GBs... > > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND > mysql 28346 36.0 15.6 3241196 2884692 ? Sl Jul04 981:19 \_ > /usr/libexec/mysqld --basedir=/usr --datadir=/IOL/mysql --user=mysql > --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 > --socket=/IOL/mysql/mysql.sock > > Once you removed the buffers and the cached memory from the total used > memory... what is left? Looks like I have "something" (that is not > buffers/cached) that takes more than 4GB... Could it be disk cache or is it > included in the cached value? > Any idea? > > Thx, > JD-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: <http://lists.centos.org/pipermail/centos/attachments/20090706/dea8cad6/attachment-0003.sig>
I'm attempting to create a script that will indicate the % utilization of a network interface. I need this to export a one shot output that can be called by nagios. I've tried the following tools but I was unable to find a way to output just the utilization, and just one time: bmon, iftop, ifstat, bwm, dstat, rrdtool, iptraf. Any ideas? Thanks, Scott
From: Peter Kjellstrom <cap at nsc.liu.se>> On Monday 06 July 2009, John Doe wrote: > > When I do a free, I get: > > total used free shared buffers cached > > Mem: 18482800 18030668 452132 0 683068 9426792 > > -/+ buffers/cache: 7920808 10561992 > > But, when I do a ps, mysql is the only process that takes noticable memory; > > and it is far from 7.9GBs... > > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND > > mysql 28346 36.0 15.6 3241196 2884692 ? Sl Jul04 981:19 \_ > > Once you removed the buffers and the cached memory from the total used > > memory... what is left? Looks like I have "something" (that is not > > buffers/cached) that takes more than 4GB... Could it be disk cache or is it > > included in the cached value? > > /proc/meminfo may give you a more detailed summary.Sadly, not much more information in /proc/meminfo... Same values as in free, since free reads it. Basicaly, 7.9GB are apparently used, but the sum of the memory used by all the processes is around 3.5GB... JD