Skip to content

Add top-like monitoring tool#333

Draft
ben-grande wants to merge 1 commit into
QubesOS:mainfrom
ben-grande:qvm-top
Draft

Add top-like monitoring tool#333
ben-grande wants to merge 1 commit into
QubesOS:mainfrom
ben-grande:qvm-top

Conversation

@ben-grande

Copy link
Copy Markdown
Contributor

Requires: QubesOS/qubes-core-agent-linux#550


which I don't know how to indirectly timeout the subprocess created by run_service_for_stdio.

run_service_for_stdio can't do that for you, but run_service can - it returns subprocess instance on which you can wait yourself, including own timeout handling (like proc.communicate(timeout=...)).

I did that, but it seems that it is difficult to limit the amount of bytes that can be read as proc.communicate(timeout=1) is a blocking operation as well as proc.stdout.read(2)

To ensure a domU doesn't fill up Dom0 memory that is being assigned to untrusted_mem, something like this would have to be done: https://stackoverflow.com/a/34114767, unless someone knows a better solution.

@marmarek

Copy link
Copy Markdown
Member

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...).

@ben-grande

ben-grande commented Jan 28, 2025 via email

Copy link
Copy Markdown
Contributor Author

@marmarek

Copy link
Copy Markdown
Member

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.

@marmarek marmarek marked this pull request as draft June 10, 2026 00:49
@ben-grande ben-grande force-pushed the qvm-top branch 2 times, most recently from 75a9ee5 to bc049c9 Compare June 10, 2026 19:25
@ben-grande

Copy link
Copy Markdown
Contributor Author

LLM helped on draw_table(). It's almost stable. It works nicely on R4.2, but not on R4.3. I don't know yet why builds are failing on manpages.

Inspiration and code from qui-domains.

Known issues:

- R4.2: scrolling works fast
- R4.3: scrolling is slow
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 this pull request may close these issues.

2 participants