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

Add top-like monitoring tool #333

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ben-grande
Copy link
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
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
Copy link
Contributor Author

ben-grande commented Jan 28, 2025 via email

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