GithubHelp home page GithubHelp logo

Comments (8)

shirou avatar shirou commented on June 9, 2024

disk.DiskIOCounters() uses

and wmi uses

From gopsutil, just invoke wmi.Query. I updated latest go-ole in my environment, DiskIOCounter WMI Query returns error. I will dig it deeper, but please wait until this weekend.

from gopsutil.

shirou avatar shirou commented on June 9, 2024

When I test now, I can not reproduce that error, with same code, same PC. Perhaps, at the last time the WMI service was something bad, I got the error. But something fixed.

disk.DiskIOCounters() always do something bad with latest go-ole and WMI? If so, could you send me some more detail?

Thank you.

from gopsutil.

oldenbur avatar oldenbur commented on June 9, 2024

I updated the following to the latest versions:

  • github.com/StackExchange/wmi
  • github.com/go-ole/go-ole
  • github.com/shirou/gopsutil

I am still observing the problem on multiple systems. The operating system is 64bit Windows Server 2012 R2 Standard. The machine is a Dell Server PER730XD with 2 wGHz Intel Xeon CPUs and 128GB RAM. I included a grafana screenshot showing the outages in CPU and Memory. These outages go away if I don't make any calls to disk.DiskIOCounters() as I mentioned. We have other ways to get this information, so this is not a serious problem for us, just letting you know. Thanks for your attention and please let me know if I can test anything for you.

screen shot 2015-12-15 at 8 27 09 am

from gopsutil.

shirou avatar shirou commented on June 9, 2024

Thanks for sharing information. I will try on Windows Server 2012 R2. And, if there is no problem, could you tell me how to get disk IO Counter with another way? I am not cleave to use WMI. If there are better way, I want to change to.

from gopsutil.

sparrc avatar sparrc commented on June 9, 2024

@shirou, if it helps, in Telegraf we use win perf mon queries to get most system stats, you can see examples and the code here: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/win_perf_counters

from gopsutil.

shirou avatar shirou commented on June 9, 2024

@sparrc, thank you for the information. But, it seems using github.com/lxn/win and that use cgo, right?

I know the PdhOpenQuery approach like this. However, I am not familiar with Windows, I could not understand, so I change to use WMI.

But as you suggested, we have to change to use PDH, though.

from gopsutil.

Lomanic avatar Lomanic commented on June 9, 2024

Small update: telegraf doesn't use github.com/lxn/win anymore and this part of the code doesn't rely on cgo.

from gopsutil.

Lomanic avatar Lomanic commented on June 9, 2024

Closed by #850

from gopsutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.