Direct OS metrics needs to accommodate OS deficiencies #1438
JBHighHair
started this conversation in
General
Replies: 2 comments 1 reply
-
|
It's fixed by #1418. Have you checked that? It's not released however. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I'm having difficultly compiling for Windows. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is a potential issue where metric collection for psutil_mem and psutil_cpu results in NaNs
In the case of psutil_mem, no metics are recorded at all (the public.psutil_mem table is empty)
When looking at /internal/reaper/psutil.go I can see potential issues where it would be possible to divide by zero simply because it does not cater for OS.
func GetGoPsutilMem
When vm.SwapTotal is 0 (occurs when OS is Windows) there is a divide by zero which results in NaN.

I've tested GetGoPsutilMem in my environment and it returns NaN for swap_percent...
Below is the updated code which mitigates this issue...
func GetGoPsutilCPU
When totalDiff is 0 there is a divide by zero which results in NaN.
Below is the updated code which mitigates this issue...
PL/Python wrappers are not an option
I'm running pgwatch on clusters and returning the collected metrics to a sink.
Unfortunately, since direct-os-stats flag is deprecated and hard set to True, I cannot use SQL queries via PL/Python wrappers which I customised to handle different OS provided below...
Beta Was this translation helpful? Give feedback.
All reactions