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 #42737 is a reply to message #42728] Tue, 17 May 2011 07:02 Go to previous message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
Tim Small wrote on 16/05/11 17:59:
> 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.
that's exactly what I need for now.
>> 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?
I guess (and hope) OpenVZ developers are also reading that list. So it
would be interesting and useful to know their opinions on that.
> 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....
Thanks for pointing that out! I guess dstat is also can be used. But the
implementation of HN CPU utilization by each CT in vz-native tools is
much more preferable way for me since there wouldn't be a need to
install additional third-party software and it would be simpler to
configure sudoers file.

Regards,
Nikolay.
>
> Tim.
>
 
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: Thu Aug 14 11:41:55 GMT 2025

Total time taken to generate the page: 0.25124 seconds