VMware {code} Community
Humphry
Contributor
Contributor

questions about statistics intervals

Hi, I have two questions about network statistics:

1.- The PerfSampleInfo contains the timestamp when the statistic is collected and the interval. But the interval is from the timestamp or until the timestamp??? For example, I have the following PerfSampleInfo:

bless( {
    'timestamp' => '2009-03-16T13:15:00Z',
    'interval' => '300'
}, 'PerfSampleInfo' ),

This means that the statistics interval is (2009-03-16T13:10:00Z - 2009-03-16T13:15:00Z )or (2009-03-16T13:15:00Z - 2009-03-16T13:20:00Z) ?????

2.- Is there any way to obtain the exact KBs transmitted in a interval??? Because, I'm currently getting the average and I multiply it for the interval. For example, in the previous interval I get an average of 50KB. So I multiply the 50KB by the 300 seconds interval and get 15000KB of data transmitted in that interval. But this is not the exact value because the transmitted value is an interger value (not float), so the result is just an approach. Is it posible to obtain the exact total value of data transmitted in a interval???

Thanks in advance.

Reply
0 Kudos
1 Reply
Steve_Jin
Expert
Expert

1. The PerfSampleInfo is part of the PerfEntityMetric data object, meant to indicate the sample information collected in the other property value (type of PerfMetricSeries[]). I think you asked a very good question regarding the exact window for the performance data.

Except for the real-time data, whose interval is 20, all the performance data are calculated based on the real-time data. In theory, there could be other choices, say, 2009-03-16T13:12:30Z - 2009-03-16T13:17:30Z. I don't know the sure answer. I think you can test it out by retrieving the most recent historical performance stats. If I have to guess here, I would guess the timestamp is on the end of the interval.

2. The size of data transmitted on the wire depends on other factors as well, like startTime, endTime, number of managed entities, performance metrics, etc. The calculation leading to 15000KB doesn't seem right to me. The performance data is not collected every second during the interval. The interval is more like a unit of time for the collection. You can, however, calculate this way, say if you know one interval (300) for your stats takes about 50KB, how about the same stats for the hour? You can then calculate like this:

(3600/300)*50 = 600KB

It's not an accurate because the SOAP header doesn't repeat itself when querying them in one call, but good enough as an estimation.

Hope it helps.

Steve JIN, VMware Engineering

Creator of VMware Infrastructure Java API. VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in deserialization; only 1/4 of the size required by AXIS. More importantly, the freedom to redistribute your applications. (Download, Samples, DocWiki, RSS Feed)

Get Connected with Other Developers in the Community?

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
Reply
0 Kudos