Skip to content
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

[core] adds swap (pagefile) to windows stats #2422

Merged
merged 1 commit into from
Apr 29, 2016
Merged

Conversation

gmmeyer
Copy link
Contributor

@gmmeyer gmmeyer commented Apr 18, 2016

Our Windows pagefile statistics are not very robust. We've had a few requests to add more, better. This PR adds such metrics.

Now we're capturing the total size of the pagefile, how much is used, how much is available and the percent that's still free.

I've tested it on Windows, it seems to work fine, and the metrics come out looking pretty nice.

@irabinovitch
Copy link
Contributor

elasticsearch failures seem unrelated. checking.

@gmmeyer
Copy link
Contributor Author

gmmeyer commented Apr 21, 2016

The failure is gone now, so I think it was unrelated.

@@ -178,6 +183,13 @@ def check(self, agentConfig):
pct_usable = float(usable) / total
self.save_sample('system.mem.pct_usable', pct_usable)

page = psutil.virtual_memory()
if page.total is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if it's possible to fetch this information from the Win32_PerfRawData_PerfOS_Memory WMI class ? See https://github.com/DataDog/dd-agent/blob/master/checks/system/win32.py#L91

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. I'll investigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The answer is, in short, we can't because they're different. I cannot, at this moment, articulate the exact difference. I'm pretty sure that Win32_PerfRawData_PerfOS_Memory does not give you the actual pagefile usage, which is what we're trying to get here.

@olivielpeau olivielpeau added this to the 5.8.0 milestone Apr 29, 2016
@yannmh
Copy link
Member

yannmh commented Apr 29, 2016

@gmmeyer Feel free to merge ;)

@gmmeyer gmmeyer merged commit 22ff87c into master Apr 29, 2016
@gmmeyer gmmeyer deleted the greg/windows-swap branch April 29, 2016 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants