1

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

1
  • +1 for using OpenVZ. Unfortunately cheap hosting do not operate properly: allocate too few resources for too many users. Jun 7, 2011 at 5:52

3 Answers 3

1

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 :-)

1
  • Thanks for clearing that up! Also, I will take a look at linnode Jun 6, 2011 at 22:37
0

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.

0

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/

1
  • This wont solve the problem in my question - shared hosting is different from virtualised hosting. Jan 4, 2013 at 1:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .