Automation

 View Only
  • 1.  what does realtime means exactly

    Posted Mar 24, 2009 11:03 AM

    hello I am monitoring esx perfs cpu and memory and I do not understand the realtime parameter

    using ESX 3.5 / VC 2.5 / VI toolkit 1

    I understood that real time catch the perfs from the ESX and not the database

    but why are they differences between both values

    exemples

    *

    *get-stat -entity $esx -realtime -stat cpu.usage.average = 6.49

    **v

    ***get-stat -entity $esx -stat cpu.usage.average = 16,3

    looks like realtime takes the value of cpu 0 and without realtime takes the average between all cpu

    *get-stat -entity $esx -realtime -stat mem.usage.average = 36.2

    **v

    ***get-stat -entity $esx -stat mem.usage.average = 30.4

    seems like realtime takes 6 % memory more thant without what is this 6% for?

    thanks for help

    Daniel

    *



  • 2.  RE: what does realtime means exactly

    Posted Mar 24, 2009 12:05 PM

    You are correct, the realtime parameter captures the statistical data that is available on the ESX server.

    The ESX server uses a 20 second interval to capture his statistics.

    Every +/- 1 minute this data is transferred from the ESX server to the VC.

    On the VC the statistical is averaged over the historical intervals.

    The default length for Historical Interval 1 is 5 minutes.

    That means that the data from HI1 takes about 15 realtime samples to calculate the average.

    It is important to look at the interval that is returned by the Get-Stat cmdlet.

    I suspect the differences you are seeing come from the different interval lengths and the fact that the values are averages over the interval.



  • 3.  RE: what does realtime means exactly

    Posted Mar 24, 2009 12:33 PM

    thanks for your answer

    seems to be ok for memory

    but if I compare the perf chart in VCenter with the results for cpu in vi toolkit

    the value I have for realtime correspond to the cpu 0 and the value I have without realtime correspond to the average realtime of the chart

    for exemple I have an esx with a saturation of cpu0 but the other ones are very low so cpu 0 100% and the average of cpu is 16% according to the vcenter chart for realtime

    and vi toolkit gives me always 100% for realtime cpu ... should be around 16 %

    Daniel



  • 4.  RE: what does realtime means exactly

    Posted Mar 24, 2009 01:11 PM

    With the CPU metrics the Get-Stat cmdlet returns also a property called Instance.

    That will say for which CPU the statistical value is.

    You are probably only looking at 1 CPU while the VIC gives you the average over all the CPUs.

    If you want the average you will have to make the sum in your script.



  • 5.  RE: what does realtime means exactly

    Posted Mar 24, 2009 02:46 PM

    do you know how I can access this property "instance"?

    I tried to find it in get-stat but can not



  • 6.  RE: what does realtime means exactly

    Posted Mar 24, 2009 02:57 PM

    Something like this for example

    Get-Stat -Stat cpu.usage.average -Entity (Get-VMHost <ESX-hostname>) -Realtime | %{
      Write-Host $_.Timestamp $_.Instance $_.Value
    }
    



  • 7.  RE: what does realtime means exactly

    Posted Mar 26, 2009 08:36 AM

    thanks

    this confirm that there is an issue perhaps I should update version of VI toolkit I use V1

    here is the result I have instance is not recognised as a property

    PS 26/03-09:28 &gt; Get-Stat -Stat cpu.usage.average -Entity $esx -Realtime |select-object timestamp,instance, value

    Timestamp instance Value

    -


    -


    -


    26/03/2009 08:29:20 10.43

    26/03/2009 08:29:00 16.04

    26/03/2009 08:28:40 34.11

    26/03/2009 08:28:20 10.73

    26/03/2009 08:28:00 10.62

    26/03/2009 08:27:40 9.36

    26/03/2009 08:27:20 13.01

    26/03/2009 08:27:00 30.59

    26/03/2009 08:26:40 27.93

    26/03/2009 08:26:20 14.71

    and here is the result of get member no trace of instance property

    PS 26/03-09:32 &gt; Get-Stat -Stat cpu.usage.average -Entity $esx -Realtime | get-member * -force

    TypeName: VMware.VimAutomation.Client20.FloatSampleImpl

    Name MemberType Definition

    -


    -


    -


    pstypenames CodeProperty System.Collections.ObjectModel.Collection`1[[System.String, mscorlib, Version=2.0.0.0, ...

    psadapted MemberSet psadapted {Value, Timestamp, MetricId, Unit, Description, Entity, get_Value, get_Timest...

    psbase MemberSet psbase {Value, Timestamp, MetricId, Unit, Description, Entity, get_Value, get_Timestamp...

    psextended MemberSet psextended {MSDN}

    psobject MemberSet psobject {Members, Properties, Methods, ImmediateBaseObject, BaseObject, TypeNames, get...

    Equals Method System.Boolean Equals(Object obj)

    GetHashCode Method System.Int32 GetHashCode()

    GetType Method System.Type GetType()

    get_Description Method System.String get_Description()

    get_Entity Method VMware.VimAutomation.Types.VIObject get_Entity()

    get_MetricId Method System.String get_MetricId()

    get_Timestamp Method System.DateTime get_Timestamp()

    get_Unit Method System.String get_Unit()

    get_Value Method System.Single get_Value()

    set_Description Method System.Void set_Description(String value)

    set_Entity Method System.Void set_Entity(VIObject value)

    set_MetricId Method System.Void set_MetricId(String value)

    set_Timestamp Method System.Void set_Timestamp(DateTime value)

    set_Unit Method System.Void set_Unit(String value)

    ToString Method System.String ToString()

    Description Property System.String Description {get;set;}

    Entity Property VMware.VimAutomation.Types.VIObject Entity {get;set;}

    MetricId Property System.String MetricId {get;set;}

    Timestamp Property System.DateTime Timestamp {get;set;}

    Unit Property System.String Unit {get;set;}

    Value Property System.Single Value {get;}

    MSDN ScriptMethod System.Object MSDN();



  • 8.  RE: what does realtime means exactly
    Best Answer

    Posted Mar 26, 2009 08:39 AM

    Yes, you should go to VITK v1.5.

    The Instance property is new in that release.