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?
to your account
The containers run in openvz environment (to be precise: driven by proxmox) and for some reason collectd v5.4.0 (5.4.0-3ubuntu2) does not capture swap utilization.
swap-io is captured well, but swap-cached, swap-free and swap-used are not.
Both /proc/swaps and /proc/meminfo readable and have meaningful numbers.
On the bare metal machines the same configuration works fine, so only openvz containers are affected.
The text was updated successfully, but these errors were encountered:
Used some gdb magic and found it: the plugin expects all three SwapTotal, SwapFree and SwapCached available: https://github.com/collectd/collectd/blob/collectd-5.4.0/src/swap.c#L342
Though in openvz container only SwapTotal and SwapFree are available.
So it just skips all.
In collectd v4 it didn't do such a smart check hence worked fine.
How about making SwapCached not mandatory?
Sorry, something went wrong.
swap plugin: Make SwapCached optional under Linux.
OpenVZ doesn't provide the line, which caused swap collection to be
skipped entirely on these systems. Instead, "cached" should simply be
ignored, as it is on other systems. Thanks to @zerkms for reporting this
Thanks for reporting this! It should be fixed in master, but I might back-port this to one of the version branches.
That was quick!
Any version is fine. I'll wait for the next release and contact some maintainers to backport it to ubuntu trusty. Or simply will just build a package for myself :-)
swap plugin: Make "cached" optional under Linux.
This is the smallest possible fix for OpenVZ, where cached is not available.
master has a more complete fix which should be used going forward.
I just pushed the above fix to collectd-5.3. It's a minimalistic fix, but should be easier to apply to older versions. The first fix uses functions only available in master right now …
@octo one of the best opensource projects support I've seen so far
@zerkms Thank you, I'm honored. I have to admit, though, that you've been lucky, I don't have a track record (yet) ;)
Just created a request to reintegrate the patch into current Trusty version: https://answers.launchpad.net/ubuntu/+source/collectd/+question/254877
No branches or pull requests