-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace wmi queries with win32 api calls #116
Conversation
Fixes elastic/beats#11840 Addresses high CPU load on windows
sigar_windows.go
Outdated
} | ||
var process = Win32_Process{CommandLine: &args[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the Win32_Process
struct completely.
sigar_windows.go
Outdated
if err != nil { | ||
return nil | ||
} | ||
var args []string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating a variable, what about just using self.List
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CHANGELOG.md
Outdated
@@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). | |||
### Fixed | |||
- Added missing runtime import for FreeBSD. #104 | |||
- Handle nil command line in Windows processes. #110 | |||
- Replaced the WMI queries with win32 apis due to high CPU usage. #11840 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this go under unrealeased
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good now
Fixes elastic/beats#11840
Alternative to disable config option here elastic/beats#3249
Addresses high CPU load on windows