Hello Ilpo,
amazing, thank you for the quick tip!
I was able to get exactly what I was looking for (see attached screenshot)
I can now get my summarized RAM usage via:
[USER@dom0 ~] xl list | awk '{print $3}' | tail -n +2 | paste -s -d+ - | bc
15022
as such I have edited my /usr/bin/qubes-i3status to add the RAM usage to my
status bar near the "running qubes section"
status_qubes() {
# Output in Status bar, ex: 6 Qubes using 15.050 MB RAM
local sum_ram="("$(xl list | awk '{print $3}' | tail -n +2 | paste -s -d+
-)")/1000"
local sum_ram=$(bc <<< "scale=3;$sum_ram")"MB"
local qubes=$(qvm-ls 2>/dev/null | grep ' \* ' | wc -l)
json qubes "$qubes Qubes using $sum_ram RAM"
}
or if you want to have the output as with "15.0G" instead of "15.050MB":
status_qubes() {
# Output in Status bar, ex: 6 Qubes using 15.0G RAM
local sum_ram="("$(xl list | awk '{print $3}' | tail -n +2 | paste -s -d+
-)")/1000"
local sum_ram=$(bc <<< "scale=1;$sum_ram")"G"
local qubes=$(qvm-ls 2>/dev/null | grep ' \* ' | wc -l)
json qubes "$qubes Qubes using $sum_ram RAM"
}
Maybe someone more skilled can write a subroutine in qubes-i3status so that it
can be enabled or disabled by the user like with all other party in the main()
area.
[799]
--
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/Im2I4u-BvUyMeVGDGbdw5ISLcJm94IIudWM_9F-1e75TFsfoarChvgE2BbGA8-xJUKTo-nRqZIE6jsLcCzpLEJeGIS6j49p6R4_KveII9_U%3D%40protonmail.com.
For more options, visit https://groups.google.com/d/optout.