# System.diskio.io.time == 0 on Windows

**URL:** <https://discuss.elastic.co/t/system-diskio-io-time-0-on-windows/85508>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 12, 2017, 6:46am UTC](https://discuss.elastic.co/t/system-diskio-io-time-0-on-windows/85508 "2017-05-12T06:46:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarko.piironen](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarko.piironen](https://discuss.elastic.co/u/jarko.piironen)\
**Post date:** [May 12, 2017, 6:46am UTC](https://discuss.elastic.co/t/system-diskio-io-time-0-on-windows/85508/1 "2017-05-12T06:46:37Z")

</div>

Using Metricbeat and [metricset.name](http://metricset.name) = diskio on a Windows Server 2012R2.

On system.diskio.io.time i only get value 0 but the other values is working fine.

What could be wrong?

```auto
#------------------------------- System Module -------------------------------
- module: system
  metricsets:
    
   # CPU stats
    - cpu

   # IO stats
    - diskio

   # Per filesystem stats
    - filesystem

   # File system summary stats
    - fsstat

   # Memory stats
    - memory

   # Network stats
    - network

   # Per process stats
    - process

 enabled: true
  period: 60s
  processes: ['.*']

```

Many thanks!

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [May 12, 2017, 12:34pm UTC](https://discuss.elastic.co/t/system-diskio-io-time-0-on-windows/85508/2 "2017-05-12T12:34:01Z")

</div>

The data is collected by using a WMI query.

```auto
PS C:\Users\vagrant> Get-WmiObject -query "SELECT * FROM Win32_PerfFormattedData_PerfDisk_LogicalDisk"

```

with the values being mapped using [disk\_windows.go](https://github.com/shirou/gopsutil/blob/master/disk/disk_windows.go#L150-L156). Do you see zeros if you run the query manually? I think because they are pre-averaged by Windows it causes problems.

There has been some [discussion](https://github.com/elastic/beats/issues/3798) of using Windows Performance Counters to collect these metrics instead of WMI. It is possible in Metricbeat 6.0 to collect the disk metrics using the performance counters, but you have to configure it through a [separate metricset](https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-metricset-windows-perfmon.html).

---

<div class="post-metadata">

**Author:** ![lowlevelio](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@lowlevelio](https://discuss.elastic.co/u/lowlevelio)\
**Post date:** [May 12, 2017, 1:46pm UTC](https://discuss.elastic.co/t/system-diskio-io-time-0-on-windows/85508/3 "2017-05-12T13:46:11Z")

</div>

If you only do one thing to metricbeat in elastic6, it should be throwing out wmi. I don't have words how lousy that api is for gathering metrics, it can't be trusted for anything.

---

<div class="post-metadata">

**Author:** ![jarko.piironen](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarko.piironen](https://discuss.elastic.co/u/jarko.piironen)\
**Post date:** [May 15, 2017, 6:12am UTC](https://discuss.elastic.co/t/system-diskio-io-time-0-on-windows/85508/4 "2017-05-15T06:12:19Z")

</div>

Yes thanks when running your Query it says 0

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 12, 2017, 6:13am UTC](https://discuss.elastic.co/t/system-diskio-io-time-0-on-windows/85508/5 "2017-06-12T06:13:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
