OpenVZ Forum


Home » Mailing lists » Users » how to get the current HN CPU utilization by particular CT
Re: how to get the current HN CPU utilization by particular CT [message #42728 is a reply to message #42718] Mon, 16 May 2011 13:59 Go to previous messageGo to previous message
Tim Small is currently offline  Tim Small
Messages: 24
Registered: April 2011
Junior Member
On 14/05/11 09:27, knawnd@gmail.com wrote:
> As far as I understand in order to determine HN CPU load produced by
> certain CT it is enough to extract 'user', 'system' and 'uptime'
> values from /proc/vz/vestat twicely. Then the formula is
> ct_cpu_usage=100%*[(user_time_2 + system_time_2) - (user_time_1 +
> system_time_1)] / (uptime_2 - uptime_1)

Can't really remember I'm afraid, but that sounds plausible, I think the
figures collected from /proc are a total amount of CPU time used for
each container, so to determine usage, you have to take two readings and
divide by elapsed time. The figure you get is the total across all CPU
cores.


>
> The second question is if there are any plans to implement HN CPU load
> produced by particular CT in some of vz* tools (e.g. in vzcpucheck
> providing some additional option and print one more column required
> info about HN CPU utilization by each container)?

Dunno. Email the developers and see if they'd be willing to accept a
patch in principle?

If not (or in any case) - I wonder if a "dstat" plugin might be a good
solution?

Actually I just looked at the dstat man page, and there seems to be a
--vz-cpu option already....


Tim.

--

South East Open Source Solutions Limited
Registered in England and Wales with company number 06134732.
Registered Office: 2 Powell Gardens, Redhill, Surrey, RH1 1TQ
VAT number: 900 6633 53 http://seoss.co.uk/ +44-(0)1273-808309
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: possible container states/statuses
Next Topic: RHEL6-based 2.6.32 now marked as stable?
Goto Forum:
  


Current Time: Fri Jun 20 11:21:38 GMT 2025

Total time taken to generate the page: 0.06010 seconds