I’ve talked before about the vast amount of useful information in the VMWare VCenter database and one thing I’ve been looking for is the total Disk IO for a given time for all host servers.
In VCenter you can see individual, historical graphs for a single Host server, but what if you want to see the accumulated Disk IO for all your host servers?
You query one of the four VPXV_HIST_STAT_ views!
select left(convert( varchar(16),sample_time,120),16) as sample_time, sum(STAT_VALUE) as stat_value from VIM_VCDB..VPXV_HIST_STAT_DAILY hsd (nolock) INNER JOIN VIM_VCDB..VPXV_ENTITY_MOID em (nolock) on hsd.ENTITY = em.MOID INNER JOIN VIM_VCDB..VPXV_ENTITY e (nolock) on em.ENTITYID = e.id where STAT_GROUP = 'disk' and STAT_NAME = 'usage' and e.ENTITY_TYPE = 'HOST' group by left(convert( varchar(16),sample_time,120),16) order by sample_time asc
You can replace VPXV_HIST_STAT_DAILY with either
to get more historical data.
The column stat_value shows disk usage IO in Kilobytes. And STAT_YEARLY is really useful to see the growth in disk IO over time.
Just paste the data into excel or your favourite graph tool and you’ll get a nice graph!
This query is useful if you have all your host servers connected to a SAN and want to see the Total IO for your servers.