(Mem.usage.Average & Mem.Active.Average meter with get-stats

I try to put together a weekly statistics using get-Stats... his works all well but if I use Mem.usage.Average, I have the memory percentage. using mem.active.average would give me the use of memory in KB, I understand.

However, I get an entry using mem.active.average null.

On the study, I noticed through the chart options to real a meter (attached document) only the section of memory in time performance?

The mem.active counter can be added to the other section? or y at - it a config I need to do?

See you soon

The metrics are collected for different intervals depend on what you are configuring in

.

In this form, you will see the 4 historical intervals and for each, there is a "level of statistics" (being the metric 4, 1 being the least metric).

You can check what you have there?

If the level is 1 for all the intervals that could be the reason why you can not get the mem.active meter.

Note the data in real time, see you in the VI Client comes from the real time hard coded interval (20 seconds) which is collected on the ESX servers themselves and is kept only for a limited period of time.

Tags: VMware

Similar Questions

  • Average usage of the CPU with get-stat

    With get-stat, I can get average use of the processor in MHz using the metric usagemhz.

    However, by default the maximum and minimum values in MHz is not in data points from 2 months ago.  That's fine if I want to just average, but I also need average peak values.  The average maximum CPU usage is possible with powerCLI?

    The thing is that when you have found these averages and you do that a day or a week of a data value is not enough to really give you a true picture - you need 2 - 3 months.  Can Haw I achieve this with PowerCLI?

    1. you can easily adapt the cmdlet Get - VM to produce the result for 1 or a limited set of the virtual machine

    For example:

    Get-VM-name MyVM | Select...

    Returns the result for 1 computer virtual called MyVM

    If you do

    Get-VM-name my * | Select...

    It returns results for all virtual machines whose name begins with "My".

    2. that's because Select-Object generates a hash table, and by default PowerShell displays like that hash tables.

    To get only the value real exchange the last select like this

    ...

    } | Select AvgCPUMhz - ExpandProperty

    ...

  • Get some pics of use with get-stat

    In vCOps, you have the concept of the 95th percentile, which allows you to get the 'average of the peaks '.  The idea is that you're taking a set of data points and get the 95th percentile of them for something like the CPU demand MHz for a set of virtual machines.

    Transfer to PowerCLI - in powerCLI rely on database of vCenter data points that were on average through the stacks.

    The problem is the following:

    If I use that data points in the last hour of the statistics 'real-time', my 95th percentile is made with points of data representing the polling intervals of 20 seconds.

    When I move the data points "Last day", then I use averages of these 20 seconds, question marks to get just the data points that represents the average of the 5 minute intervals.  In other words, I've already lost a part of my high and low data points in the update rollup and by 5 minute data are smoothed out now to be an average of the 20 seconds that I had.

    Then spend a week and I have stacks of my data points "last day."  Now my data points are smoothed even further.  Among all of the points of data to the left now, I lost still more ups and downs in my every 5 minutes, and I have only the averages for these intervals of 5 minutes in my 30 minutes of interval data points.

    The point is that the further I go back, the pics more and valleys I lose as rollups toning their stop.  So if I do the calculation 95th percentile, over the period of time, I'm comment less than a true representation of the 95th percentile I don't really have.  Because I work off the coast of data where the peaks and troughs have been rounded more for fewer data points.

    By LucD, who proposed a way to get the 95th percentile:

    https://communities.VMware.com/thread/460129

    I can get a rough estimate of the 95th percentile.  However, it appears (correct me if wrong) that I'll be back a month or two or three months or one year that my 95th percentile will be reduced and a balance budget actual 95th percentile and more a 95th percentile of the average instead of a 95th percentile of actual performance data. and probably further from vCOps make account.

    Any proposed solutions to this problem?  The goal here is to use PowerCLI for model truly what my 'tip' periods look like for an application of VMs CPU when for example, at the end of the month, everyone makes their treatment.

    Although there is no official took in charge methods to extract data from the DB vCOps, it is possible.

    Clinton did a post on this, see informal VMware vCenter Operations Powershell Module

    And of course, there will be a chapter in vCOps in my next book, that I mentioned earlier

  • VM return do not all data with Get-Stat

    Hello

    I'm having a weird problem with a script to output report PowerCLI (attached), there are 3 machines that do fit all the data (the exit is on the attached .txt). This is probably a simple solution, but I don't know how I could reproduce it in my lab and I don't want to mess with the customer's production environment. Maybe some of you guys have concocted with something similar.

    I have powershell v.4, PowerCLI 5.1 running on a windows 7 Pro 64-bit

    Thanks in advance for your ideas.

    .no-data.png

    It seems that the jobs of aggregation have stopped running.

    Take a look at the tasks scheduled on the DB server where you vCenter DB is stored.

  • CPU.ready.summation of measurement when cpu.usage.average max

    Hi, I'm new in powercli,

    I use the following script to get cpu.usage.average mem.usage.average min, average, max, and the maximum of cpu.ready.summation

    I would like to correct also the cpu.ready.summation when the cpu.usage.average is max, and I can't!

    Here is my script:

    $allvms = @)
    $vms = get - Vm
    {foreach ($vm to $vms)
    $vmstat = "" | Select VmName, MemMax, MemAvg, MemMin, CPUMax, CPUAvg, CPUMin, CPURDYMax
    $vmstat. VmName = $vm.name
    $statcpu = get-Stat-entity ($vm) - start (get-date). AddDays(-1)-Finish (Get-Date) - MaxSamples 10000 - Intervalmins 30 - stat cpu.usage.average
    $statmem = get-Stat-entity ($vm) - start (get-date). AddDays(-1)-Finish (Get-Date) - MaxSamples 10000 - Intervalmins 30 - stat mem.usage.average
    $statcpurdy = get-Stat-entity ($vm) - start (get-date). AddDays(-1)-Finish (Get-Date) - MaxSamples 10000 - Intervalmins 30 - stat cpu.ready.summation
    $cpu = $statcpu | Measure-object-property value - average - Maximum - Minimum
    $mem = $statmem | Measure-object-property value - average - Maximum - Minimum
    $cpurdy = $statcpurdy | Measure-object-property value - average - Maximum - Minimum
    $vmstat. CPUMax = $cpu. Maximum
    $vmstat. CPUAvg = $cpu. Average
    $vmstat. CPUMin = $cpu. Minimum
    $vmstat. MemMax = $mem. Maximum
    $vmstat. MemAvg = $mem. Average
    $vmstat. MemMin = $mem. Minimum
    $vmstat. CPURDYMax = $cpurdy. Maximum
    $allvms += $vmstat
    }
    $allvms | Select VmName, MemMax, MemAvg, MemMin, CPUMax, CPUAvg, CPUMin, CPURDYMax | Export-Csv "c:\extract.csv" - noTypeInformation

    Best regards.

    OK, I hope that I finally got.

    Try this version. It indicates the maximum percentage of loan for the day.

    $allvms = @()
    $vms = Get-Vm  $start = (Get-Date).AddDays(-1)
    $metrics = "cpu.usage.average","mem.usage.average","cpu.ready.summation"
    Get-Stat -Entity $vms -Start $start -Stat $metrics |
    Group-Object -Property {$_.Entity.Name} | %{
      $cpu = $_.Group | where {$_.MetricId -eq "cpu.usage.average" -and $_.Instance -eq ""} | Measure-Object -Property value -Average -Maximum -Minimum  $mem = $_.Group | where {$_.MetricId -eq "mem.usage.average"} | Measure-Object -Property value -Average -Maximum -Minimum  $vmstat = "" | Select Time,VmName, MemMax, MemAvg, MemMin, CPUMax, CPUAvg, CPUMin, CPURDYMaxPercent  $vmstat.VmName = $_.Group[0].Entity.Name  $vmstat.Time = $_.Group | Sort-Object -Property Timestamp | Select -First 1 | Select -ExpandProperty Timestamp  $vmstat.CPUMax = $cpu.Maximum  $vmstat.CPUAvg = $cpu.Average  $vmstat.CPUMin = $cpu.Minimum  $vmstat.MemMax = $mem.Maximum  $vmstat.MemAvg = $mem.Average  $vmstat.MemMin = $mem.Minimum  $vmstat.CPURDYMaxPercent = &{
        ($_.Group | where {$_.MetricId -eq "cpu.ready.summation" -and $_.Instance -eq ""} |
        Sort-Object -Property Value -Descending |    Select -First 1 |
        Select -ExpandProperty Value)/$interval  }
      $allvms += $vmstat}
    $allvms | Select Time,VmName, MemMax, MemAvg, MemMin, CPUMax, CPUAvg, CPUMin, CPURDYMaxPercent |
    Export-Csv "c:\extract.csv" -noTypeInformation -UseCulture
    
  • How can I get date uniform and exit time to get-stat on servers located in areas with different regional settings?

    Hello together,

    I use a HSP on different vCenters script all over the world to sample performance data. Unfortunetaly vCenter servers concerninbg time Windows locale and date are different. For this reason that I ve had different and output date at the time of the csv. Here is an example to read a virtual computer processor performance.

    Get-Stat - feature $vm.name - Stat "cpu.usage.average" - IntervalMins 5 - (Get-Date).adddays(-1)-.addminutes(-5)-MaxSamples Start to finish (Get-Date) 288. Select-Object timestamp, value, unit | Export-Csv

    vCenter Server located in the United States with the American Time (12-hour AM/PM) and the settings of Date (day/month/year):

    'Timestamp', 'Value', 'unit '.

    "2010-06-27 12:00 PM","2.75","%.

    "

    "

    vCenter Server located in Europe with countries European regionalen (24 hours) and Date settings (day.month.year):

    Timestamp, value, unit

    "21.06.2010 20:00:00", "3.06", %

    "

    "

    For the import of these data to our central database, the formats must be uniform.

    Someone at - it an idea to get the uniform format?

    Thanks in advance

    Concerning

    Oliver

    Why don't you use the solution in Use-Culture - Culture culture - Script {scriptblock} ?

    You do all the writing to your database in 1 selected (for example en-US culture).

    This way all your date and and digital formats have the same layout.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • "Mem.Usage.Average" against the total aggregate of cluster host memory

    Please see the attachment for the whole story.

    Please give me a sanity check on this. I used the "Mem.Usage.Average" as a % against allocated VM MemoryMB. The sum of these calculations escaped by far the actual calculations of the vCenter % memory-based. So, I changed my calculations that you see in the worksheet to use the 'Mem.Usage.Average' against the total aggregate available on all hosts in the cluster. This amount came to less than 1% of my calculations based on vCenter GUI. Am I right against the total aggregate memory cluster host instead of against VM memory assigned using 'Mem.Usage.Average '? Thxs-

    ExcelOutput.jpg

    SDK is not clear on "total configured memory available or". https://www.VMware.com/support/developer/converter-SDK/conv55_apireference/memory_counters.html Part description of memory used as a percentage of the total configured or available memory.


    $start = (get-Date). AddDays(-5)

    Get-cluster-location ActualClusterName | Get - VM | Where {$_.} PowerState - eq "Receptor"} @{N = "Mem.Usage.Average"; E = {[Math]: round ((($_ |))} Get-Stat - Stat mem.usage.average - start $start - $finish - IntervalMins 1800 - MaxSamples finishing (250) | Measure - Object - average value). Average), 2)}}"


    Cluster is 6 hosts with 128G per host for total of 768G (786432 MB of RAM), there are 118 powered on virtual machines


    vCGUI.jpg

    for me the SDK says that percentage reflects the relationship between the memory 'active' in the virtual machine against the memory configured for the virtual machine.

    A configured with 8 GB of memory virtual computer that has 'use' of 25% is actively using 2 GB of memory.

    I think that your numbers you get for VMS are biased because of the great period of time during which you take the average (see previous answer).

    You can cross-check the mem.usage.average with the mem.active.average.

    In the following code, I calculate the different 2 meters actual memory used by the virtual machine.

    $clusterName = "mycluster.

    $stat = 'mem.usage.average ','mem.active.average '.

    $vm = get - Cluster - name $clusterName | Get - VM | where {$_.} PowerState - eq "Receptor"}

    $stats = get-Stat-entity $vm - Stat $stat - Realtime - MaxSamples 1

    $stats | Group-object - property {$_.} @entity.name} | %{

    [PSCustomObject] @ {}

    VM = $_. Group [0]. @entity.name

    MemoryMB = $_. Group [0]. Entity.MemoryMB

    MemUsagePerc = $_. Group | where {$_.} MetricId - eq "mem.usage.average"} | Select - ExpandProperty value

    MemUsageMB = [int]($_.) Group [0]. Entity.MemoryMB * ($_.) Group | where {$_.} MetricId - eq "mem.usage.average"}). Value) / 100

    MemActiveMB = ($_.) Group | where {$_.} MetricId - eq "mem.active.average"} | Select - ExpandProperty Value) / 1 KB

    }

    }

    The result shows a specific virtual machine, these two numbers are close enough to be considered the same imho.

    That they should be in fact, the mem.usage.average is derived from the mem.active.average.

  • MEM.usage.Average Question

    We make sure that our ESX clusters are run under 70% memory usage.  Is it possible to subtract 70 (percent) memory usage in the following script?

    foreach ($cluster Get-cluster |) Sort - Object) {$esx = $cluster |} Get-VMHost; $ds = get-Datastore - VMHost $esx | where {$_.} Type - eq "VMFS"}; $cluster | Select @{N = "Cluster name"; E = {$cluster. Name}}, @{N = 'use of memory (%) » ; E = {[Math]: round ((($_ |))} Get-Stat - Stat mem.usage.average - Start (Get-Date). AddHours(-72) - IntervalMins 5 - MaxSamples (12) | Measure - Object - average value). Average), 2)}}}

    Easy enough;

    
    foreach($cluster in Get-Cluster | Sort-Object ){
    $esx = $cluster | Get-VMHost;
    $ds = Get-Datastore -VMHost $esx | where {$_.Type -eq "VMFS"};
    $cluster | Select @{N="Cluster Name";E={$cluster.Name}},
      @{N="Memory Usage (%)";E={[Math]::Round((($_ | Get-Stat -Stat mem.usage.average -Start (Get-Date).AddHours(-72) -IntervalMins 5 -MaxSamples (12) | Measure-Object Value -Average).Average),2)}},
      @{N="Amount Under Threshold";E={70 - [Math]::Round((($_ | Get-Stat -Stat mem.usage.average -Start (Get-Date).AddHours(-72) -IntervalMins 5 -MaxSamples (12) | Measure-Object Value -Average).Average),2)}},
      @{N="GB Used";E={144/100 * [Math]::Round((($_ | Get-Stat -Stat mem.usage.average -Start (Get-Date).AddHours(-72) -IntervalMins 5 -MaxSamples (12) | Measure-Object Value -Average).Average),2)}},
      @{N="GB Free";E={144 - (144/100 * [Math]::Round((($_ | Get-Stat -Stat mem.usage.average -Start (Get-Date).AddHours(-72) -IntervalMins 5 -MaxSamples (12) | Measure-Object Value -Average).Average),2))}}  
    
    }
    
  • NET. Throughput.usage.Average

    Get - VM * db * |

    Select Name, @{N = ' Mbit/s Avg network flow'; E = {}

    [math]: Round ((Get-Stat-entité $_-Start (Get-Date).)) AddDays(-1)-Stat "net.throughput.usage.average" |

    where {$_.} {Instance - eq ""} |

    Measure-object-property - average value. Select average - ExpandProperty) / 1 k, 2)

    }}

    I got the result as below

    NameMbps throughput of the network of AVG
    x0
    There2.16
    z0.11

    now Questions or clarification;

    1.

    NET. Throughput.usage.AverageUse of net debitKbps

    The use of band current network bandwidth for the host

    Why then the o/p shows MBPs & not Kbps

    2. If a second on the last day 1 as the VM did network traffic means 2.16 for vm y?  Does include entering & leaving them both?

    Thank you

    To get the unit use the property Unit of or the returned samples.

    The net.throughput.usage.average metric is the sum of the net.received.average and net.transmitted.average parameters.

    See also network script get-stat

  • Get-Stat & weighted average

    When I run

    Get-ResourcePool -name "RSNAME" | Get-Stat -Stat mem.consumed.average
    

    Powercli is a weighted average (weighted average arithmetic - Wikipedia, the free encyclopedia)? Or I have to take into account that a VM can have data for each interval points, IE the VM did not exist at that time?

    It is a weighted average return.

  • Average read get-stat - virtualdisk.read.average stat?

    Hi all

    I want to use the metric virtualdisk.read.average to calculate the average read speeds per virtual disk to a virtual computer in the last 24 hours (using the 5 min interval)

    [1]

    I want to calculate the average in * every * instance and then add these individual averages until you get the desired amount.

    For example (using real-time output just for example only, I want 24 hours actually):

    MetricId unit Insta timestamp value
    NCE
    --------                ---------                          ----- ----     -----
    VirtualDisk.Read.Ave... 13/05/2011 19:39 6 Kbps scsi0:0
    VirtualDisk.Read.Ave... 13/05/2011 19:38:40 Kbps 11 scsi0:0
    VirtualDisk.Read.Ave... 13/05/2011 19:38:20 KBps 39 scsi0:0
    VirtualDisk.Read.Ave... 13/05/2011 19:38 431 Kbps scsi0:0
    VirtualDisk.Read.Ave... 13/05/2011 19:39 10 Kbps scsi0:1
    VirtualDisk.Read.Ave... 13/05/2011 19:38:40 Kbps 0 scsi0:1
    VirtualDisk.Read.Ave... 13/05/2011 19:38:20 5 kbps scsi0:1
    VirtualDisk.Read.Ave... 13/05/2011 19:38 0 Kbps scsi0:1

    Average (6 + 11 + 39 + 431) = 121.75

    average (10 + 0 + 5 + 0) = 3.75

    Total liked: 121.75 + 3.75 = 125,5

    What is the best way to achieve this? (Unfortunately there is no global instance as with the network and cpu.usagemhz parameters)

    [2]

    For the calculation of the IOPS / s, if you use the metric datastore.*, OR as the virtualdisk.*, is the following statement, 100% good:

    (a) virtualDisk.number [Read |] Write] Averaged.Average will calculate the OPS are / s generated by the virtual machine

    (b) disk.number [Read |] Write] .summation will calculate the OPS are / s that hit this particular data store (useful to see how busy is a data store - but will not provide any info on a single virtual machine (unless by chance, there is only a virtual computer on this data store special))

    [3]

    How to use virtualDisk.number [Read |] Write] calculate the IOPS / s for a given virtual machine?  Depending on the issue [1], to each VMDK, PAHO are / s on average individually and then add the averages for overall IOPS generated by this virtual machine in the last 24 hours?

    Concerning

    marc0

    Kind regards

    marc0

    [1] use the Group-Object and Measure-Object cmdlets for this.

    For example

    $vm = Get-VM MyVM $report = @()
    $stats = Get-Stat -Entity $vm -Stat virtualdisk.read.average -Start (Get-Date).AddHours(-12)
    $stats | Group-Object -Property Instance | %{
        $row = "" | Select Instance,Average
        $row.Instance = $_.Group[0].Instance
        $row.Average = ($stats | Measure-Object -Property Value -Average).Average
        $report += $row}
    $report $total = ($report | Measure-Object -Property Average -Sum).Sum
    Write-Host $vm.Name $total
    

    This will calculate the averages per virtual disk and add the averages together

    [2] see my post get PAHO are / s maximum .

    (a) Yes, provided that you add the OPS are / s for each virtual disk total

    (b) No, if you run the Get-Stat for an entity that is a virtual machine, you will get the statistics for this specific VM disk.

    The metric is available for HostSystem and VirtualMachine. See the column of the entity in the drive settings page.

    [3] Yes

  • If I buy a new hard drive, I use the activation number provided with my computer to re - install Windows XP?

    activation and replacement hard drive

    Greetings from St. John's Newfoundland. My wife has given car for my birthday washer and I wiped the ENTIRE hard drive, including the operating system. (XP). I have recovery CD but the computer will not read and install XP. I want to know it is if I buy a new hard drive, can I use the activation number provided with my computer to re - install Windows XP?

    Hello

    Yes, you can use the activation code for re - install Windows XP.

    Note: If you have exceeded the number of times to activate the product, then you would not be able to activate, you may need to contact the manufacturer to perform a factory restore.

  • Service Pack 3 Setup error: "Service Pack 3 Setup cannot update an active (debug) system with a free (retail) version of Service Pack 3, or vice versa"

    Service Pack 3 Setup error: "Service Pack 3 Setup cannot update an active (debug) system with a free (retail) version of Service Pack 3, or vice versa"

    I have XP SP3 download Tuff. I have a Dell Inspiron 16000 w / XP Edition home (version 2002) W / SP 2 is installed.  I couldn't find a reference to the error in line last night.  Can anyone help?

    Turbo Tax 2011 says that I can not download their stuff until I get my XP Stuff to the height.

    Only 6 more days until what the tax man will come :-)...

    Help!

    Put your search inside the quotes term allows when you search for the exact error messages:

    "Service Pack 3 installation cannot update an active (debug) system with a free (retail)"

    The first shot has the answer: http://www.askvg.com/windows-xp-sp3-setup-error-cannot-update-a-checked-debug-system-with-a-free-retail-version-of-service-pack-3/

    CurrentType at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion value should read "Uniprocessor Free" or "free multiprocessor".

    John

  • Windows Activation error 0xC004F009 with active Windows 7

    Now using Windows 7 Professional x 86 K

    I activated my windows with my original OEM key and used for approximately 2 ~ 3 months works well

    but, since yesterday, it tells me that windows is not activated with black screen

    one thing that is strange is when I start, it reminds me of who is not activated, but when I look at the Control Panel, it says me that it is activated successfully.

    How can I fix this error?

    Sorry for my bad English...

    Try to activate Windows 7 by phone
    http://support.Microsoft.com/kb/950929/en-us

    1) click Start and in the search for box type: slui.exe 4
    (2) press the ENTER"" key.
    (3) to select your "country" you are in the drop-down list.
    (4) choose the option "activate phone".
    (5) stay on the phone * do not select/press any option * and wait for a person to help you.
    (6) explain your problem clearly to the support person.
    (7) the person must give you a confirmation ID, copy it down on paper,
    (8) check that the ID is correct in reading the support person.
    (9) to enter the ID number, then click 'Next' to complete the activation process.

    Activation and registration of a Microsoft product
    http://support.Microsoft.com/?kbid=326851
    Windows activation: (888) 571-2048
    (888) 725-1047 or 800-936-5700

    J W Stuart: http://www.pagestart.com

  • Deployed Adobe CC 2014 32 bits to our neighborhood. Students launch Adobe Flash Professional and are able to start a project using ActionScript 2.0. But as soon as they click on save and try to save their project... boom... an error occurs "met with an in

    Deployed Adobe CC 2014 32 bits to our neighborhood. Students launch Adobe Flash Professional and are able to start a project using ActionScript 2.0. But as soon as they click on save and try to save their project... boom... an error occurs "met with an invalid argument' it happens to any student and any computer. Help, please!

    They can only use the old Adobe CS5 flash professional because it does not crash.

    Thank you

    Raul

    [email protected]

    CC for flash doesn't support AS2, so perhaps that is the reason.  CS6 (or earlier version) supports AS2.

Maybe you are looking for

  • installation your browser

    I installed your browser in my home page and this page keeps popping up instead http://search.myspeedtestxp.com/?uid=1d87a432-0180-4ed2-9202-453ada6e62d5 & uc = 20150915 & PA = pythondirect & source = pd_gd_ www.thetechart.com_speedtest_us, gd-US-300

  • Where can I buy Satellite A300 - 27H?

    Can someone tell me where they saw one of them is available to buy in the United Kingdom? A Google search gives me little success apart from an unknown retailer.

  • HP Pavillion 11 x 360: shift keys do not work

    This is a new laptop open at Christmas and or SHIFT keys work. Can you tell if there is something that can solve this problem, or will he be back? All advice would be very welcome... ! Thank you very much

  • Comodo Firewall Pro Updater error

    Whenever I try to update of Comodo Firewall, it connects fine, but when it tries to download updates, an error is titled: 112 error: unable to copy the file cfp.exe. Please contact the support. Any ideas on how to solve the problem? Thanks in advance

  • Activation blocked

    third time in the well. My win7 disks are real. they came with the COA sticker and true embedded hologram. I have install this sort of thing for a living and I know real when I see it. I sent the results of the Diag tool real return, the answer "tool