Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have purchased an OpenVZ VPS from one of the hundreds of internet hosting companies. I dont pay much for it, but lately performance has been terrible.

They are obviously overselling, but I am trying to determine by how much. Is it possible to, from within an OpenVZ VPS, check CPU usage/memory usage of the host machine?

Commands like 'top' only seem to show the usage for my specific VPS, but 'cat /proc/cpuinfo' shows the cpuinfo for the underlying host CPU

Thanks

share|improve this question
    
+1 for using OpenVZ. Unfortunately cheap hosting do not operate properly: allocate too few resources for too many users. –  Aleksandr Levchuk Jun 7 '11 at 5:52
add comment

3 Answers 3

up vote 0 down vote accepted

Your vm is effectively sandboxed. without something on the host specifically giving you the info, you wont be able to get it.

edit: Also, try linnode. They've been great for me, one of the few internet companies I dont have a single complaint about :-)

share|improve this answer
    
Thanks for clearing that up! Also, I will take a look at linnode –  Erin Drummond Jun 6 '11 at 22:37
add comment

For memory free -m should do the job.

You can infer the available CPU time by running something that normally would take up 100% an then looking at top to see how much CPU time the program is able to grab at a given time.

cat /proc/cpuinfo is the processor that you are using. OpenVZ does not emulate any hardware. It simply uses real hardware and shares among the containers. OpenVZ provides enough isolation that the containers are just like virtual machines.

From inside the container, you can explore the low-level resources that were allocated to you:

less -S /proc/user_beancounters

The values are explained here: http://wiki.openvz.org/Proc/user_beancounters

But the limit of CPU units is not there. You will not see explicitly how of much of CPU is shared with others.

share|improve this answer
add comment

Bit late in replying but I have written a program in PHP that will show you the CPU and RAM usage stats of your server, including shared hosting.

You can check it out here - http://code.google.com/p/php-cpu-monitor/

share|improve this answer
    
This wont solve the problem in my question - shared hosting is different from virtualised hosting. –  Erin Drummond Jan 4 '13 at 1:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.