Comments (8)
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.
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.
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.
from gopsutil.
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.
@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.
@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.
Small update: telegraf doesn't use github.com/lxn/win anymore and this part of the code doesn't rely on cgo.
from gopsutil.
Closed by #850
from gopsutil.
Related Issues (20)
- cpu Mhz with current, max and min.
- Data race
- GPU Stats HOT 1
- macos tests failed on Github Action after latest image update
- Process information not reported for FreeBSD ARM64 HOT 1
- Can't compile for openbsd HOT 2
- When I call process.Percent,memory increase slowly
- proc.openfiles() crash HOT 1
- Monitor specific ports for network HOT 1
- v4 release plan HOT 1
- Is it possible to obtain the power of the whole machine? HOT 2
- Standart interfaces for services HOT 1
- Using host.HostID() on the Windows platform The uuid obtained is different from the cmd `wmic csproduct get uuid` HOT 2
- can't use the "disk" package
- cpu.parseStatLine bug HOT 5
- Process createTime calculation for linux lxc guest is incorrect HOT 4
- Non-root user can't get process information HOT 1
- Report a bare-meteral machine as KVM at host.Info HOT 1
- The host.Info() function is unable to correctly identify CentOS Stream 8. HOT 1
- Missing FQDN/hostname option for windows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopsutil.