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

Buggy value for memory_internal_free on Dom0 #6157

Closed
TSnake41 opened this issue Dec 4, 2024 · 0 comments · Fixed by #6204
Closed

Buggy value for memory_internal_free on Dom0 #6157

TSnake41 opened this issue Dec 4, 2024 · 0 comments · Fixed by #6204

Comments

@TSnake41
Copy link

TSnake41 commented Dec 4, 2024

memory_internal_free is actually reported as bytes but with kilobytes instead.

https://github.com/xapi-project/xen-api/blob/26b6ed61d4edef2699b34eacfb0c901b9edb1b45/ocaml/xcp-rrdd/bin/rrdd/xcp_rrdd.ml

let mem_available () =
  let* size, kb = scan "/proc/meminfo" in
  match kb with "kB" -> ok size | _ -> res_error "unexpected unit: %s" kb

This is read as kilobytes (and is it actually reading the MemAvailable ?)

match mem_available () with
 | Ok mem ->
    Some
     ( Rrd.VM uuid
     , Ds.ds_make ~name:"memory_internal_free" ~units:"B"
    ~description:"Dom0 current free memory"
    ~value:(Rrd.VT_Int64 mem) ~ty:Rrd.Gauge ~min:0.0
    ~default:true ()
    )

But this is pushed as is, with units as "B" instead of "KiB".

gthvn1 added a commit to xcp-ng/xen-api that referenced this issue Jan 2, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant