Query VCentreDatabase for VM stats

  • I am looking at many posts to find a script that can query VCDB to get CPU,Memory Utilization.
    I developed a logic but the values i get from this does not match with the vSphere tool.
    Any Ideas?

  • Question is, are the values in the database "per unit time", or in some way cumulative?   It's important to understand exactly what one row in the database table actually represents.   Is it a point in time measurement?   Or is it an aggregate across a specific time window?  Or perhaps some kind of cumulative average, and again, you'd need to know what time frame it applies to.   Also, do you know what the basis is for numbers you're getting from vSphere?  You would need to be sure that you are comparing apples with apples, as opposed to oranges, so to speak.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Its the same tables as the vsphere uses while getting the data. identified it by checking with the help of queries like sp_who2
    but dont know the exact calculation. the query i pasted above does get the CPU usage data not usagemhz/cpu ready time.

  • rajborntodare - Tuesday, May 22, 2018 10:03 AM

    Its the same tables as the vsphere uses while getting the data. identified it by checking with the help of queries like sp_who2
    but dont know the exact calculation. the query i pasted above does get the CPU usage data not usagemhz/cpu ready time.

    I'm still going to guess that however vSphere looks at those numbers, that your query does NOT reproduce that.   As I have no familiarity with that database, I can't help with the details.   Talk to the vendor or see if they have an online forum.   Someone may have already tried what you are trying to do.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Take a look at these queries (as well the link to the vCenter views) written by Jonathan Kehayias and see if those work for you:
    Querying the VMware vCenter Database (VCDB) for Performance and Configuration Information

    Sue

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply