View Full Version : How to see the real cpu and mem?
flycker
04-26-2006, 01:21 PM
Hi!
Why this command (free -m) i get all the memory of the server and the (top) either.
Can i see only the memory and the cpu from my account plan?
I have plan 2 (256mb) and (400Mhz).
Tks
FlycKER
/proc/meminfo is not fully virtualized yet. For memory usage info, check out privvmpages in /proc/user_beancounters. It is displayed in memory pages (4k segments)
glowworm
04-30-2006, 12:31 AM
Can anyone give hints as to what the fields mean?
Held is obviously what is in use now, maxheld I would guess is as high as you have gotten, is barrier your allocation and limit the machine resources?
Also, to get KB am I correct to say (($PAGES * 4))
shmpages looks to be IPC, shared memory and tmpfs
oomguarpages is your ram guarantee
vmguarpages is your virtual ram guarantee
privvmpages is your burst ram allowed
Are there any other interesting figures? In particular the CPU and DISK?
/me is writing a "vpsfree" bash job to decode the settings. So far I have:#/bin/bash
awk '/oomguarpages/ {print "RAM Guarantee: " 4*$2/1024 "KB in use out of " 4*$4/1024 "KB with a maximum of " 4*$3/1024 "KB"}' /proc/user_beancounters
awk '/privvmpages/ {print "Allowed Burst RAM: " 4*$2/1024 "KB in use out of " 4*$4/1024 "KB with a maximum of " 4*$3/1024 "KB"}' /proc/user_beancounters
awk '/vmguarpages/ {print "Virtual Memory Guarantee: " 4*$2/1024 "KB in use out of " 4*$4/1024 "KB with a maximum of " 4*$3/1024 "KB"}' /proc/user_beancountersWhich for me outputs:RAM Guarantee: 393.062KB in use out of 240.078KB with a maximum of 1247.04KB
Allowed Burst RAM: 524.203KB in use out of 2000KB with a maximum of 1410.01KB
Virtual Memory Guarantee: 0KB in use out of 240.078KB with a maximum of 0KB
Interesting, because if my calculations are correct I am using more RAM than guaranteed. Darn, could be time to increase my package I think.
I see oom is short 4 pages in the guarantee, easy enough to increase, but is the in-use also 4 pages short or does it reflect a real value?
grummund
06-04-2006, 04:09 PM
Can anyone give hints as to what the fields mean?
Try page 57 of the OpenVZ User Guide for starters:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf
fwiw, I found the fields pretty confusing too. privvmpages is the one I concentrate on when looking at bean_counters (seems to be the limit I bust first... on another VPS) but of course the failcnt column also gives some clues towards resourse issues.
Also, to get KB am I correct to say (($PAGES * 4))
Yes absolutely, or put another way: divide the number you see by 256 to get Megabytes.
Interesting, because if my calculations are correct I am using more RAM than guaranteed. Darn, could be time to increase my package I think.
Note there are bugs in the VPS memory accounting... that may or may not be what you see.
Although the OpenVZ developers seem to fix these as they are reported, I'm not sure what level of patches is applied by RapidVPS. I discovered a memory leak issue (on another VPS) which required the host system to be rebooted (rebooting the VPS does not help), also there is a recent issue where the host system can be caused to kernel panic...
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.