Add top-like monitoring tool#333
Conversation
Do you mean read() hangs for you? Maybe the service waits for something before starting to output any data (doesn't look like it based on the other PR...). |
|
Not the service by default, I prepended sleep to awk to test if a DomU
could hang operation on Dom0 and if this is a valid concern.
…On Tue, Jan 28, 2025, 12:25 PM Marek Marczykowski-Górecki < ***@***.***> wrote:
is a blocking operation as well as proc.stdout.read(2)
Do you mean read() hangs for you? Maybe the service waits for something
before starting to output any data (doesn't look like it based on the other
PR...).
—
Reply to this email directly, view it on GitHub
<#333 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCE2O4LDOXXM2LA43ENCLQ32M5SKPAVCNFSM6AAAAABWAFNTCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYG4ZDGNBUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Based on discussion in the other PR, this should be converted to use stat events (and events extended to include necessary info). Converting to draft until then. |
75a9ee5 to
bc049c9
Compare
|
LLM helped on |
2af82dc to
a5b743e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #333 +/- ##
==========================================
- Coverage 76.79% 69.04% -7.75%
==========================================
Files 53 54 +1
Lines 9402 10473 +1071
==========================================
+ Hits 7220 7231 +11
- Misses 2182 3242 +1060 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
One thing I don't plan to fix is the memory reporting being wrong, as only qmemman has the knowledge about memory of each qube, and getting information from it is not currently nice with it's current API (synchonous), and I don't want to delay reporting statistics because qmemman is busy for seconds at a time. |
|
Maybe it's not necessary, reading past conversations, something that I didn't understand one year ago (qmemman, admin.vm.Stats), I think I will settle for meminfo: QubesOS/qubes-core-agent-linux#550 (comment). |
|
And one more bug, for dom0, it should use |
|
And yes, |
4ab3c3a to
8027157
Compare
I'm not sure either, but I guess Anyway, I don't like exposing stubdomains in a high level tool, it should be counted as part of the target qube; if anything, maybe some separate column for some internal overhead, but not separate row. |
fbcc633 to
3a573f8
Compare
|
I have added a ton of things recently. You can do everything from the keyboard or mouse. You can filter the view, sort by column (or invert), select one or more domains. For the latter, it does nothing currently besides highlighting, the goal is to have an htop like kill column, where you select the kill signal, in our case, it would be "shutdown, kill, (re)start". If there is anything you'd like to see, please let me know. There will be a video tomorrow, if QVC doesn't burn my computer. In the far future, this might become the qube manager for headless connections, but for now, I will restrict just for statistics due to time. |
When checking libvirt event callbacks, VIR_DOMAIN_EVENT_STOPPED is the only event called when shutting down or destroying/killing a domain, so the state transitions from Running->Halted, therefore, ever sending "Halting" or "Dying". I made changes to core-admin to at least inform the "Halting" state, while deprecating the "Dying" state. I checked the clients, and only qubes-manager is using "Dying", but it has a "Halting" equivalent, which all translate to the same visuals as "Transient".
c5079c0 to
fa7a1c6
Compare
Cut in half the to get derived qubes.
Inspiration and code from qui-domains and visuals from xentop. - Color data, when possible, qube names are colored according to label, it works okay on XTerm (except orang) but colors render perfectly on Xfce4-terminal. The black label is just printed as the default foreground color, because using standout on it would be unnecessary highlight. - Clock to show last time the screen was refreshed - Allows scrolling domain list when it is longer than the screen height, with a less-style type hint indicating pages - To scroll, readline style (Emacs) navigation is supported, with some Vi keys also supported. Mouse navigation is also supported. - Inexpensive calls using "admin.vm.Stats" - Can show only columns you specify - Shows all non-halted domains by default, but can show only specified ones also - Screen refresh is delayed until needed, small sleep to avoid user perceiving delays when scrolling - Can sort per column and click again to reverse the sort, with a little indicator at the end of the column - Can filter list of domains after the program is already running - Can act based on common actions available from all selected domains, such as kill if qubes are running, start if qubes are halted
677f43d to
9a000ea
Compare
Strings are trusted, they are just label and name. But some values such as those reported by the qube via xenstore keys, are not so trusted and can be large integers. Instead of printing dubious data, print an ellipsis to symbolize it wouldn't fit. It might be a programming error, might be a malicious information, fall on the safe side.
- Swap column introduced to know when the qube should have more memory, swaping is never nice. - Columns are ordered in "total", "standard", "internal". - Do not consider percentage intensity when irrelevant
I think I am finished on the client, but will have to retest it after writing and fixing tests of QubesOS/qubes-core-admin#827. For the description of each column, see the manual page or the Minimal view (55 columns):
Default view (79 columns):
Maximum view (203 columns):
The The If you noticed, I didn't include The Actions:
Notice that when selecting both domains, you can only get the common actions. |








Add top-like monitoring tool
Inspiration and code from qui-domains and visuals from xentop.
with a less-type hint indicating how many lines to scroll
Vi keys also supported
Requires: QubesOS/qubes-core-admin#826
Requires: QubesOS/qubes-core-admin#827
Breaking change on a commit, which requires new client versions: