<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: PowerCLI &#038; vSphere statistics – Part 3 – Instances	</title>
	<atom:link href="https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/</link>
	<description>My PowerShell ramblings</description>
	<lastBuildDate>Wed, 08 Apr 2020 10:20:14 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.9</generator>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/><atom:link rel="hub" href="https://websubhub.com/hub"/>	<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-3257</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Fri, 22 Aug 2014 15:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-3257</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-3255&quot;&gt;Jason Weaver&lt;/a&gt;.

Hi Jason,
It looks as if the counter is not available for that specific entity in that specific timeframe.
Which time period, and hence Historical Interval, did you select ?
Is your vCenter set to at least statistics level 2 for that Historical Interval ?]]></description>
			<content:encoded><![CDATA[<p>Hi Jason,<br />
It looks as if the counter is not available for that specific entity in that specific timeframe.<br />
Which time period, and hence Historical Interval, did you select ?<br />
Is your vCenter set to at least statistics level 2 for that Historical Interval ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jason Weaver		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-3255</link>

		<dc:creator><![CDATA[Jason Weaver]]></dc:creator>
		<pubDate>Fri, 22 Aug 2014 14:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-3255</guid>

					<description><![CDATA[Getting multiple errors:
Get-Stat : 8/22/2014 10:15:27 AM    Get-Stat        The metric counter &quot;disk.kernellatency.average&quot; doesn&#039;t exist for entity &quot;&quot;.    
At H:\scripts\get_esxtop.ps1:37 char:18
+ $stats = Get-Stat &#060;&#060;&#060;&#060;  -Entity $esxImpl -Stat $metrics -Start $startDate -Finish $endDate &#124; `
    + CategoryInfo          : ResourceUnavailable: (disk.kernellatency.average:String) [Get-Stat], VimException
    + FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_CheckUserMetrics_MetricDoesntExist,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats

That would make it line 35 in your script.]]></description>
			<content:encoded><![CDATA[<p>Getting multiple errors:<br />
Get-Stat : 8/22/2014 10:15:27 AM    Get-Stat        The metric counter &#8220;disk.kernellatency.average&#8221; doesn&#8217;t exist for entity &#8220;&#8221;.<br />
At H:\scripts\get_esxtop.ps1:37 char:18<br />
+ $stats = Get-Stat &lt;&lt;&lt;&lt;  -Entity $esxImpl -Stat $metrics -Start $startDate -Finish $endDate | `<br />
    + CategoryInfo          : ResourceUnavailable: (disk.kernellatency.average:String) [Get-Stat], VimException<br />
    + FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_CheckUserMetrics_MetricDoesntExist,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats</p>
<p>That would make it line 35 in your script.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: hermouet		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1972</link>

		<dc:creator><![CDATA[hermouet]]></dc:creator>
		<pubDate>Wed, 16 Jan 2013 15:51:17 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1972</guid>

					<description><![CDATA[hi Luc

nice script. good job.

Line 10-11: to have any practical value the metrics should be requested from the Realtime interval.

when i export my value from past day it change to every 30min and not every 2min. so theire is mean to change this and export all value every 2mn ? next i import on database and work with that

tks]]></description>
			<content:encoded><![CDATA[<p>hi Luc</p>
<p>nice script. good job.</p>
<p>Line 10-11: to have any practical value the metrics should be requested from the Realtime interval.</p>
<p>when i export my value from past day it change to every 30min and not every 2min. so theire is mean to change this and export all value every 2mn ? next i import on database and work with that</p>
<p>tks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: kevin		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1432</link>

		<dc:creator><![CDATA[kevin]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 14:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1432</guid>

					<description><![CDATA[&lt;a href=&quot;#comment-1431&quot; rel=&quot;nofollow&quot;&gt;@LucD &lt;/a&gt; 
i am testing get-stat2 for disk info
right now it is throwing an error on this line in get-stat2
$metricId = $perfMgr.QueryAvailablePerfMetric($Entity.MoRef,$null,$null,$numinterval)

error is    ............ (this is way beyond my .net expertise)

Exception calling &quot;QueryAvailablePerfMetric&quot; with &quot;4&quot; argument(s): &quot;entity&quot;
At C:\Windows\TEMP\eaaaeeed-d3dc-4367-968b-6ebfe4e88a60.ps1:154 char:50
+     $metricId = $perfMgr.QueryAvailablePerfMetric &#060;&#060;&#060;&#060; ($Entity.MoRef,$null,$null,$numinterval)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException]]></description>
			<content:encoded><![CDATA[<p><a href="#comment-1431" rel="nofollow">@LucD </a><br />
i am testing get-stat2 for disk info<br />
right now it is throwing an error on this line in get-stat2<br />
$metricId = $perfMgr.QueryAvailablePerfMetric($Entity.MoRef,$null,$null,$numinterval)</p>
<p>error is    &#8230;&#8230;&#8230;&#8230; (this is way beyond my .net expertise)</p>
<p>Exception calling &#8220;QueryAvailablePerfMetric&#8221; with &#8220;4&#8221; argument(s): &#8220;entity&#8221;<br />
At C:\Windows\TEMP\eaaaeeed-d3dc-4367-968b-6ebfe4e88a60.ps1:154 char:50<br />
+     $metricId = $perfMgr.QueryAvailablePerfMetric &lt;&lt;&lt;&lt; ($Entity.MoRef,$null,$null,$numinterval)<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1431</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 21:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1431</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1430&quot;&gt;kevin&lt;/a&gt;.

@Kevin, I&#039;m afraid the Get-Stat cmdlet is a bit flawed for the disk metrics.
The bypass is to use the Get-Stat2 function from my &lt;a href=&quot;https://www.lucd.info/2011/06/19/datastore-usage-statistics/&quot; rel=&quot;nofollow&quot;&gt;Datastore usage statistics&lt;/a&gt; post.

With that function you first do
&lt;code&gt;
Get-Stat2 -entity $esx -interval &quot;HI1&quot; -Stat &quot;disk.deviceLatency.average&quot; -queryinstances
&lt;/code&gt;
to list the available instances. And then you can do something like
&lt;code&gt;
Get-Stat2 -entity $esx -interval &quot;HI1&quot; -Stat &quot;disk.deviceLatency.average&quot; -instance &quot;naa.600507680280709ed000000000000172&quot;
&lt;/code&gt;
I&#039;m afraid you have to give an instance with this type of metric.]]></description>
			<content:encoded><![CDATA[<p>@Kevin, I&#8217;m afraid the Get-Stat cmdlet is a bit flawed for the disk metrics.<br />
The bypass is to use the Get-Stat2 function from my <a href="https://www.lucd.info/2011/06/19/datastore-usage-statistics/" rel="nofollow">Datastore usage statistics</a> post.</p>
<p>With that function you first do<br />
<code><br />
Get-Stat2 -entity $esx -interval "HI1" -Stat "disk.deviceLatency.average" -queryinstances<br />
</code><br />
to list the available instances. And then you can do something like<br />
<code><br />
Get-Stat2 -entity $esx -interval "HI1" -Stat "disk.deviceLatency.average" -instance "naa.600507680280709ed000000000000172"<br />
</code><br />
I&#8217;m afraid you have to give an instance with this type of metric.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: kevin		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1430</link>

		<dc:creator><![CDATA[kevin]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 20:28:23 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1430</guid>

					<description><![CDATA[also, it doesn&#039;t look like the counters exist when connecting to a vcenter.     Get-Stat : 1/30/2012 3:25:11 PM    Get-Stat        The metric counter &quot;disk.devicelatency.average&quot; doesn&#039;t exist for entity &quot;ltlesxvts15.loutap.loutms.tree&quot;.    
At C:\Downloads\vmware\scripts\latency report.ps1:57 char:19
 &lt;a href=&quot;#comment-1427&quot; rel=&quot;nofollow&quot;&gt;@LucD &lt;/a&gt;]]></description>
			<content:encoded><![CDATA[<p>also, it doesn&#8217;t look like the counters exist when connecting to a vcenter.     Get-Stat : 1/30/2012 3:25:11 PM    Get-Stat        The metric counter &#8220;disk.devicelatency.average&#8221; doesn&#8217;t exist for entity &#8220;ltlesxvts15.loutap.loutms.tree&#8221;.<br />
At C:\Downloads\vmware\scripts\latency report.ps1:57 char:19<br />
 <a href="#comment-1427" rel="nofollow">@LucD </a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1429</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 20:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1429</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1428&quot;&gt;kevin&lt;/a&gt;.

@Kevin, that is correct.
On the vCenter the statistical data is collected from the ESX(i) servers and aggregated into 4 historical intervals.
In &lt;a href=&quot;https://www.lucd.info/2009/12/30/powercli-vsphere-statistics-part-1-the-basics/&quot; rel=&quot;nofollow&quot;&gt;PowerCLI &amp; vSphere statistics – Part 1 – The basics&lt;/a&gt; this is explained in further detail.]]></description>
			<content:encoded><![CDATA[<p>@Kevin, that is correct.<br />
On the vCenter the statistical data is collected from the ESX(i) servers and aggregated into 4 historical intervals.<br />
In <a href="https://www.lucd.info/2009/12/30/powercli-vsphere-statistics-part-1-the-basics/" rel="nofollow">PowerCLI &#038; vSphere statistics – Part 1 – The basics</a> this is explained in further detail.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: kevin		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1428</link>

		<dc:creator><![CDATA[kevin]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 20:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1428</guid>

					<description><![CDATA[my initial run with results was to a single esx hosts.  i don&#039;t see any code in your example to handle multiple hosts,   i have been working on that.  so if i connect to a vcenter, i should be able to see historical data?&lt;a href=&quot;#comment-1427&quot; rel=&quot;nofollow&quot;&gt;@LucD &lt;/a&gt;]]></description>
			<content:encoded><![CDATA[<p>my initial run with results was to a single esx hosts.  i don&#8217;t see any code in your example to handle multiple hosts,   i have been working on that.  so if i connect to a vcenter, i should be able to see historical data?<a href="#comment-1427" rel="nofollow">@LucD </a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1427</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 18:50:50 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1427</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1426&quot;&gt;kevin&lt;/a&gt;.

@Kevin, are you perhaps adding the -Realtime switch. The performance data is kept on the ESX(i) for about 1 hour before it is collected by the vCenter.
Or are you connected to an ESX(i) server instead of the vCenter ?]]></description>
			<content:encoded><![CDATA[<p>@Kevin, are you perhaps adding the -Realtime switch. The performance data is kept on the ESX(i) for about 1 hour before it is collected by the vCenter.<br />
Or are you connected to an ESX(i) server instead of the vCenter ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: kevin		</title>
		<link>https://www.lucd.info/2010/01/13/powercli-vsphere-statistics-part-3-instances/#comment-1426</link>

		<dc:creator><![CDATA[kevin]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 18:27:01 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1510#comment-1426</guid>

					<description><![CDATA[looks like i can only get data for the last hour no matter what interval i use.  is there anyway to get historical data on disklatency?]]></description>
			<content:encoded><![CDATA[<p>looks like i can only get data for the last hour no matter what interval i use.  is there anyway to get historical data on disklatency?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
