Code Monkey home page Code Monkey logo

Comments (4)

toobulkeh avatar toobulkeh commented on June 9, 2024

I tried it with a different vCenter and was able to get stats from the 300 intervalId. It must be a server side config.

irb(main):203:0> pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: '2013-07-31 11:20:00AM'}).first[1][:metrics]
=> {"cpu.usagemhz"=>[2002, 2365, 2562, 2075, 2078, 2505, 2050, 2040, 2883, 2417, 1975, 2327, 2102, 2060, 2751, 2396, 2479, 2364, 2144, 2037, 2673, 2203, 1993, 2288, 2079, 2007, 2704, 2123, 3348, 2479, 2136, 2335, 3047, 2382, 2138, 2406, 2267, 2781, 3311, 2277, 2170, 2549, 2215, 2057, 2855, 2376, 2224, 2311, 2136, 2138, 2593, 2038, 2236, 2406, 2156, 2100, 2838, 2280, 2075, 2353, 2110, 2060, 2658, 2606, 2284, 2400, 2111, 2120, 2836, 2355, 2412, 2398]}
irb(main):204:0> pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: '2013-07-31 11:20:00AM'}).first[1][:metrics]['cpu.usagemhz'].count
=> 72

one thing is it doesn't look like max_samples is working... debugging that now.

from rbvmomi.

cdickmann avatar cdickmann commented on June 9, 2024

There are different levels that govern which counter gets saved for how
long. Your counter is likely in a level where its real time only at this
point.
On Jul 31, 2013 10:36 AM, "Dan Moore" [email protected] wrote:

I tried it with a different vCenter and was able to get stats from the 300
intervalId. It must be a server side config.

irb(main):203:0> pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: '2013-07-31 11:20:00AM'}).first[1][:metrics]=> {"cpu.usagemhz"=>[2002, 2365, 2562, 2075, 2078, 2505, 2050, 2040, 2883, 2417, 1975, 2327, 2102, 2060, 2751, 2396, 2479, 2364, 2144, 2037, 2673, 2203, 1993, 2288, 2079, 2007, 2704, 2123, 3348, 2479, 2136, 2335, 3047, 2382, 2138, 2406, 2267, 2781, 3311, 2277, 2170, 2549, 2215, 2057, 2855, 2376, 2224, 2311, 2136, 2138, 2593, 2038, 2236, 2406, 2156, 2100, 2838, 2280, 2075, 2353, 2110, 2060, 2658, 2606, 2284, 2400, 2111, 2120, 2836, 2355, 2412, 2398]}irb(main):204:0> pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: '2013-07-31 11:20:00AM'}).first[1][:metrics]['cpu.usagemhz'].count=> 72

one thing is it doesn't look like max_samples is working... debugging that
now.


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-21880189
.

from rbvmomi.

toobulkeh avatar toobulkeh commented on June 9, 2024

Right, but that's not the problem here.

The underlying problem here is calling the counter 'cpu.usagemhz' returns the first instance of cpu.usagemhz -- which is of rollup (none) - only at logging level 4. rollup 'average' counter is at level 1. The helper function doesn't allow you to specify.

Check this doc
http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/cpu_counters.html

And this gist I wrote on the issue:
https://gist.github.com/toobulkeh/6124975

Thanks so much for replying!

from rbvmomi.

atfujihara avatar atfujihara commented on June 9, 2024

I also met the same problem. So I sent following PR:
#75

By this change, we can specify the target performance counter including RollupType like 'cpu.usagemhz.averate'. Unfortunately, it's not yet merged. It seems something verification or test is needed. But I don't know what can I do.

Anyway, I created custom gem and am using it. It's looks working well.

from rbvmomi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.