-
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
Overflows in total actual memory/swap #102
Comments
I am seeing this form two different hosts running 5.6.8 - can I help in providing any information ? |
|
❯ cat /compat/linux/proc/meminfo
|
gosigar version : ❯ git log -1 | less
|
Any news on this ? I have completely removed the memory metric from my hosts - until this is resolved. Can I help in anyway? |
Hi @michbsd, Thaks for the info provided, I think that it is being problematic to use the same logic to collect memory stats from Linux and FreeBSD as we do now, so to solve it in FreeBSD we should probably implement its own logic. We have also seen related issues on Linux but maybe they have a different cause. I'd like to take a look to this soon. |
Let me know if I can be of any assistance |
just pinging again about this.. more or less all of my servers are subject to this, so I cannot reliably do mem stats (graphs) - anyway, I could just exclude the "system.memory.actual.used.bytes" as that seems to be the only one bugging out ? |
I found an example of wrong reporting:
If we look at the code in sigar_linux_common.go:
With the above numbers, that would be: Used = (total - free) : 66967400 - 66897268 = 70132 ActualUsed = (Used - kern): 70132-2420336 = -2350204 |
Hello again, I wrote a crude (but working) fix - I have tested on 2-3 different FreeBSD boxes and it seems to work...
|
@michbsd oh, thanks for taking the initiative on this 🙂 Would you mind to open a pull request with your code? |
sure.. just now sure how to handle the sigar_linux_common part... cause I still want to use that file for FreeBSD (e.g. CPU) but not memory... how can I disregard only a part of the common file? |
Move the |
OK |
done |
Continuing discussion about fix for FreeBSD in #106 |
Some issues have been reported regarding weird huge values for used memory or swap. The reported values are near max
uint64
, and are calculated asUsed = Total - Free
. It seems that somehow at some moments the reportedFree
actual memory or swap is greater thanTotal
memory or swap.Cases reported so far:
The text was updated successfully, but these errors were encountered: