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

Get total memory on Windows #3787

Closed
emexelem opened this issue Feb 12, 2018 · 7 comments
Closed

Get total memory on Windows #3787

emexelem opened this issue Feb 12, 2018 · 7 comments

Comments

@emexelem
Copy link

I'm trying to figure out how we can get directly or compute the total memory available on a Windows system.
I'm using the default configuration for Windows and enabled inputs.win_perf_counters.object.IncludeTotal but could not find how to get this information.

@kerams
Copy link
Contributor

kerams commented Feb 13, 2018

There does not appear to be an easy way to do that (https://serverfault.com/a/377941/188824).

Also, setting IncludeTotal to true has no effect here because none of the counters in the Memory category have any instances at all, let alone any called _Total.

@danielnelson
Copy link
Contributor

Does the mem plugin do this correctly on Windows?

[[inputs.mem]]
  # no configuration

@kerams
Copy link
Contributor

kerams commented Feb 16, 2018

Hm, for some reason I thought inputs.mem did not work on Windows. You're right though, it does report the correct total.

@emexelem
Copy link
Author

emexelem commented Feb 16, 2018

inputs.mem makes use of WMI, which has wmic ComputerSystem get TotalPhysicalMemory but according to the comments in the config file

# These are the recommended method of monitoring system metrics on windows,
# as the regular system plugins (inputs.cpu, inputs.mem, etc.) rely on WMI,
# which utilize more system resources.```

@danielnelson
Copy link
Contributor

I think I will close this issue, we could open another if there is another option for getting this information. I'd be interested to hear how well the plugin works in practice for you though.

@eclements
Copy link

@danielnelson I also came across this problem today for windows monitoring with Telegraf + perfmon collectors. I can only report "available memory" but not what the total memory on the server is, or what percentage of total memory is free. Any suggestions? I also can't seem to show accurately the total memory used... in my case I have 160GB ram, with 100GB of memory usage not showing, but I can see there is 60GB free in the graph but no way to show that 100GB is in use.

image

@danielnelson
Copy link
Contributor

Give the mem input a second try, it no longer uses WMI and should be more suitable for use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants