Dom0 resource monitor for all domains?

I’m obsessed with my task manager - I feel I get the most out of my machine when I carefully manage memory & CPU consumption

The native task manager is domain-specific. It’ll graph activity within a given qube, but even at the dom0 level, it won’t graph consumption across domains

So I find myself spamming ‘xl list’ in the dom0 terminal to get a realtime-esque system memory feed. I havent found an existing GUI to graph it, though it feels as though one would be pretty straightforward to cobble together…

Does such a program already exist somewhere? Or should I get to coding?

2 Likes

Hey @random_user, any updates? (Sorry if I missed your post or something)

2 Likes

And you can make conky.
But be aware, if you go into cairo graphics you will have memory leaks.
I’ve managed to trim it down to 20MiB/h

1 Like

I created a Widget for detailed memory usage
For your usecase still no CPU usage …
And not as wholesome as @random_user approach, but it is available :wink:

1 Like

You can use xentop or xentop -b in dom0 if you want a printout of the current CPU and memory usage of each qube.

1 Like

This is an amazing conky for Qubes-OS that give you full of content

1 Like

@clammy

I have set a 5s generic monitor in my panel that calls this script:

#!/bin/bash

set -euo pipefail
/usr/bin/renice -n 19 $$ > /dev/null 2>&1

pattern='s/Mem:(\s*[0-9.a-zA-Z]+){2}\s*([0-9\.a-zA-Z]+).*/\2/g'
free_mem=$(/usr/bin/free --human \
			 | head --lines=2 \
			 | tail --lines=1 \
			 | sed -r "${pattern}")

pattern='s/Swap:(\s*[0-9.a-zA-Z]+){1}\s*([0-9\.a-zA-Z]+).*/\2/g'
used_swap=$(/usr/bin/free --human \
                         | head --lines=3 \
                         | tail --lines=1 \
                         | sed -r "${pattern}")

printf "%s [%s] %s" "$(xl info free_memory)" "${free_mem}" "${used_swap}"

Pasting here too, because the forum started to mess up code recently and I don’t know if it is fixed:

https://paste.opensuse.org/pastes/72fc5534923d

The above code displays Xen’s free memory, then dom0’s (in brackets), then swap.

For CPU load, I use this in another 5 sec generic monitor:

1 Like
1 Like

I had to modify your codeblock to match your pasted one.

@FranklyFlawless

Thanks.

I wonder if I should start adding a checksum to warn the reader in case of such bugs.

1 Like