Hi, both in qubes-manager as well as in the i3 status bar, Qubes only displays the allocated memory, which pretty much always is 95% of the available memory, so I came up with this one-liner to calculate the really used memory:
echo $(((`(for VM in $(xl list|egrep -v "(Name|dom0)"|cut -d " " -f1) ; do
/usr/lib/qubes/qrexec-client -d $VM user:"/usr/bin/vmstat -s -S K" -t -T|grep
"used memory"|cut -d "K" -f1 ; done)|xargs echo|sed "s# #+#g#"`)/1024))MB used
it's still (maybe) a bit ugly for two reasons:
- I don't use /usr/bin/bc cause I don't want to have this installed in dom0
- instead of running /usr/bin/vmstat I would rather like to access
(think /usr/bin/cat) /proc/meminfo of the VMs from dom0, but I don't know
how to do this yet.
--
cheers,
Holger
--
You received this message because you are subscribed to the Google Groups
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qubes-users/20170222173717.GB13117%40layer-acht.org.
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Digital signature
