VMware {code} Community
rolandt
Contributor
Contributor

Issues with viperformance.pl

This problem (and question about a work around) was first posted for VIperlToolkit beta 2 but I get the same errors with the public released version of VIperlToolkit.

\-----

What I want to get is [b]only[/b][/u] the aggregate ESX server values for CPU, MEM, Network, and DISK for a specific number of most recent summarized intervals back from "now".

I am having issues with the app viperformance.pl. This is suppose to let you selectively pull performance counters. But I can either get all or nothing (depending on which parameters and values entered).

For example with type "cpu" - what I want is just the aggregate ESX server values (no per processor core values) but can not get it.

Issues around --instance:

If I do not specify --instance then I get data for the system plus each processor core BUT none of them have an instance name.

If I specify --instance "server name" for the instance parameter I get the error: "Either Performance data not available for requested period or instance is invalid". Even though it is the same exact value as shown in VC for that server and used for the host name parameter for the perl script.

If I specify --instance "\[0-9]" (for the processor core number) for the instance, I again get ALL instances reported. But, this time every instance (including the system aggregate) has the name value of \[the number enter].

If I specify --instance * for the instance, I get all of the instances reported. The correct processor core numbers are included this time but there is still no name \[blank value] for the system aggregate instance counters.

For --samples and --interval parameters:

If I specify --interval 20 or leave it out to default to 20 then whatever number I specify for --samples nn is used. For example, if I specify --interval 20 --samples 2 , I get 2 values for the most recent 20 second intervals \[i.e. "real-time"].

However, if I specify any of the aggregation intervals "300 (5 minutes), 900 (15 minutes), 3600 (1 hour), or 86400 (1 day)", then whatever value I enter for --samples is ignored and I get every value in the interval history. For example, if I specify --interval 300 --samples 2 , instead of 2 values for each instance I get 296 , which is the total number for that aggregation range.

Has anyone else seen this and developed some work around?

thanks..........

Reply
0 Kudos
6 Replies
SaranshG
Enthusiast
Enthusiast

Here are the answers of some of your queries

For example with type "cpu" - what I want is just the aggregate ESX server values (no per processor core values) but can not get it.[/i]

instance = "" -- returns the aggregated statistics value.

If I do not specify --instance then I get data for the system plus each processor core BUT none of them have an instance name.[/i]

Instance name for aggregate doesnot appear while for individual instances, the instance name is returned. Please verify it again.

If I specify --instance "server name" for the instance parameter I get the error: "Either Performance data not available for requested period or instance is invalid". Even though it is the same exact value as shown in VC for that server and used for the host name parameter for the perl script.[/i]

I will get it verified and let you know that why there is no instance name for aggreagate ESX server values, this might have not been handled in the script but this is sure that server name is not a valid arguement to be passed as an instance.

If I specify --instance "\[0-9]" (for the processor core number) for the instance, I again get ALL instances reported. But, this time every instance (including the system aggregate) has the name value of \[the number enter][/i]

You are getting the right data beacuse

The instance name identifies the instance and is derived from configuration names. For host and virtual machine devices, the instance name is the device name. For example, the name of the disk or name of the virtual Ethernet adapter. For a CPU, the instance names "0", "1", "2", and so on are used to identify the numeric order of the CPU.

if I specify any of the aggregation intervals "300 (5 minutes), 900 (15 minutes), 3600 (1 hour), or 86400 (1 day)", then whatever value I enter for --samples is ignored and I get every value in the interval history. For example, if I specify --interval 300 --samples 2 , instead of 2 values for each instance I get 296 , which is the total number for that aggregation range.[/i]

Samples is ignored in case of interval > 20

The number of samples returned are more recent samples in the time range specified. For example, if the you specifie a maxSample of 1, but not a given time range, the most recent sample collected is returned. This parameter can be used only when querying for real-time statistics[/b] by setting the intervalId parameter to the provider's refreshRate. This argument is ignored for historical statistics.

Reply
0 Kudos
marko06
Contributor
Contributor

Hello!

I have some issues too:

+The number of samples returned are more recent samples in the time

range specified. For example, if the you specifie a maxSample of 1, but

not a given time range, the most recent sample collected is returned.

This parameter can be used only when querying for real-time statistics by setting the intervalId parameter to the provider's refreshRate. This argument is ignored for historical statistics. +

If I specify:

21:12 $ perl viperformance.pl --config ../vc.conf --host somehost --countertype disk --samples 1

I get:

...

Counter: Disk Usage (Average)

Instance :

Description: Aggregated storage performance statistics. For hosts this can be represented on a per Virtual Machine basis as a stacked graph

Units: KBps

Sample info : 20,2009-05-14T*19:12:00*Z

Value: 35

Since I am able to see real time statistics of memory with VI Client with real time, I would like to know what might be the reason for this 2h difference

THANKS for replay!

PS: I would like to get real-time (latest) statistics for cpu,mem,disk,net every 5minutes...and make graphs from that....

Reply
0 Kudos
admin
Immortal
Immortal

You must specify valid value for the parameter interval, if you require data for specific interval. Valid values for interval are explained at explanation for PerfInterval data object in Reference Guide. viperformance.pl provides the real-time stat for entities which support realtime data, if interval not specified. For other entities it provide data for Past Day whose sampling period is 300 seconds( 5 minutes). For realtime, valid interval is 20. Please refer Tech Notes on Performance counters for detailed explanation on Counters and flow of viperformance.pl available at www.vmware.com/files/pdf/technote_PerformanceCounters.pdf .

Reply
0 Kudos
marko06
Contributor
Contributor

Thanks for answering!

Samples is ignored in case of interval > 20

Does that mean that I can get the latest value if I specify interval 300 seconds? Then the solution would be to get latest 15 samples of 20 second interval and compute the average. Thats probably how 300 interval samples are computed (or not?).

Reply
0 Kudos
admin
Immortal
Immortal

I could not decipher as what you imply when you mentioned, "Samples is ignored in case of interval > 20". What samples attribute represent here is "maxSample" parameter of PerfQuerySpec. Incase you consider 300 as your interval and you specify it as 15 then 15 values would be returned captured at 5 minutes of interval. Also I would like to bring under your notice that 'interval' must be a valid IntervalID, it cannot be any integer greater than 20, these are logically defined.

An interval is a data structure, the PerfInterval data object type, that comprises metadata about the sampled data. All properties associated with intervals are defined in terms of seconds. So the base sampling period is 5 minutes (300 seconds). An interval defines the length of time for sampling performance data. The intervals apply to all managed entities. The real‐time interval is 20 seconds, which means that the system samples performance statistics generated for 20 seconds and then consolidates, or rolls-up the data, into a single value.Please refer "PerfInterval" Data object in your Reference Guide.

Reply
0 Kudos
AlanMcKay
Contributor
Contributor

I also have issues with this. I don't understand what it wants for --host. For example, I just want to get the whole CPU usage for the entire ESXi server. At this point I really don't care what each VM is consuming. I just want totals.

How can I get that?

Reply
0 Kudos