Xen and per VM monitoring

How are you guys monitoring CPU/RAM/DISK usage of Xen itself?
I know of “xentop”, but was hoping for something more graphicaly appealing :slight_smile:
Something that can show some graphs for resource usage of the bare metal, but also per VM graphs.

I recommend ‘system-stats-xen’ by tasket. Just copy the tiny script into dom0’s /usr/bin and make it executable. I renamed mine to ‘xentask’ (xentop-tasket) to make it easier to remember and type. The other scripts are also worth looking at


## System stats for Qubes dom0
## Chris Laprise 2018
## https://github.com/tasket/Qubes-scripts

sensor_lines='Package id 0|fan1'
header="\033[2K\nVM NAME               CPU(% )    MEMORY(MB)"

other_stats () {
  sensors |grep -E "^($sensor_lines)"

echo -e "$header\n"
cpusum=0; memsum=0; table="$sumline"
stdbuf -oL xentop -b -f -d $delay \
| stdbuf -oL awk '{printf ("%-22s %5d     %7d\n", $1,$4,$5/1000) }' \
| (
    read ln
    while true; do
      read -t 0.1 ln
      if [ $? = 0 ]; then
        read name cpu mem <<<"$ln"
        (( cpusum += cpu ))
        (( memsum += mem ))
      else # End of list, print totals, make new page.
        sort -k $sortcol -n -r <<<"$table"
        printf '%-22s %5d     %7d\033[J\033[H' " " $cpusum $memsum
        read ln
        cpusum=0; memsum=0
        #sensors |grep -E "^($sensor_lines)"
        echo -e "$header\n\033[2K"

Good old conky also works.

My config: https://github.com/3hhh/qubes-conky

1 Like

There we go, that’s a nice one :slight_smile:
Though, shows mainly stats for dom0 not the xenserver.

I’ll dig a bit, maybe not too hard to extend it to show overall “health”.

Actually, referring back to the OP, it seems to me there’s no way to monitor “Xen itself”. xentop regularly shows dom0 figures that are not borne out by top (etc.) in dom0. Does anyone know of a monitoring tool that actually shows/includes xen processes?

Yeah indeed, this is what I’m after. Showing CPU, memory, disk utilization etc from XenServers point of view.
Assume something that can call “libvirt” would be the way to go, but that’s above my level :slight_smile:

Just following up on this post. Quite surprised there wasn’t more replies :slight_smile:
Nobody monitoring the overall health and usage of the underlying hypervisor?
I mean, for all one know there is some issues in the xen enviornment making the CPU usage there 100% while dom0 and other regular AppVMs are idle.
How is the memory usage from the xenserver perspective (xentop gives some, but…)

How about other xenserver related software based issues or reporting of hardware from xens perspective.
I can’t imagine I’m the only one curious about the health of the hypervisor enviornment ? :slight_smile:

A post was split to a new topic: Installing Conky

xentop is nice, but it would be nice if there was a hypervisor CPU/RAM at the top of the qube specific stats. The qube specific stats are good, but 25% of CPU is not the same as 25% of the total CPU, be it 2,4,6,8,12 cores, etc