Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2023 15:51:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 269097] rctl(8) seems to include idle time in cputime
Message-ID:  <bug-269097-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269097

            Bug ID: 269097
           Summary: rctl(8) seems to include idle time in cputime
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: dfr@rabson.org

I tried to use rctl_get_racct("jail:0", ...) to get metrics for the host but
cputime seems to include time spent in the idle process. On an idle machine
with 16 hardware threads, I ran this:

$ while true; do sudo rctl -u jail:0 | grep cputime; sleep 1; done
cputime=3D4145725
cputime=3D4145741
cputime=3D4145757
cputime=3D4145773
cputime=3D4145789

The cputime increases by 16 each time. I was expecting filter jail:0 to show
summary cputime metrics for the host plus jails but instead, it always shows
100% cpu usage. If this is intentional, it should probably be mentioned in =
the
documentation.

I can probably work around by getting metrics for the idle proc and
subtracting.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269097-227>