Virtualmin System Information Page displaying wrong RAM

Hello,

Recently I’ve noticed that the system information page in Virtualmin is displaying:

188 MB total, 149.97 MB used

whereas free -m shows the following:

total used free shared buffers cached Mem: 752 340 411 0 0 0 -/+ buffers/cache: 340 411 Swap: 8192 0 8192

Anyone got any ideas?

Many thanks, Martin

That’s rather odd… Both that Virtualmin is so off for “total memory”, and your “free” output looks strange too. “cached” should never be higher than “used”, because “used” includes “cached”. What distribution are you using there? For me (Ubuntu 12.04 x64), the “free” output looks like so:

total used free shared buffers cached Mem: 2003 1854 148 0 24 574 -/+ buffers/cache: 1256 747 Swap: 1533 294 1239

Generally, Virtualmin’s “used” display is “used minus cached” in free, because memory used as file system cache is “semi-free”, i.e. it can be assigned to applications at any time.

EDIT: Sorry, I got confused by your linebreak-less output! :smiley: I overlooked that your shared, buffers and cached is all at 0.

So yeah, Virtualmin indeed seems to be detecting the memory completely wrong there. WHat happens when you click the “Refresh information” link on top of the page? I’m not sure which command Webmin uses to determine memory stats, I suppose Eric or Jamie could fill us in there.

Thanks Locotus. Sorry about the confusion with the output of free!

I’m running Centos 5.9.

The output on the system information page is still wrong when I refresh…

It’s not a big problem - just something I noticed and wondered if anyone else had the same problem…

Thanks, Martin

Howdy,

Hmm, are you using a VPS of some sort? If so, what kind of VPS is it?

Also, can you paste in the contents of /proc/meminfo?

Thanks!

-Eric

Hi Eric,

Yes, it’s a VPS running on OpenVZ:

contents of /proc/meminfo

MemTotal: 770048 kB MemFree: 299908 kB Buffers: 0 kB Cached: 0 kB SwapCached: 0 kB Active: 0 kB Inactive: 0 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 770048 kB LowFree: 299908 kB SwapTotal: 8388608 kB SwapFree: 8388608 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 0 kB Mapped: 0 kB Slab: 0 kB PageTables: 0 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 0 kB Committed_AS: 0 kB VmallocTotal: 0 kB VmallocUsed: 0 kB VmallocChunk: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 2048 kB

and here’s free -m

total used free shared buffers cached Mem: 752 460 291 0 0 0 -/+ buffers/cache: 460 291 Swap: 8192 0 8192

Thanks, Martin