Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

KVM guest VM process state parameters (shell script)

Monitors of this template are compatible with all license types and are provided as an example of using single shell script with several parameters, to obtain required information.

Prerequisites: it is assumed that
  • C:\Scripts directory exists on the computer running IPHost Network Monitor
  • shell script kvm-get-beans.sh (included into attached .zip archive) is unpacked into the above directory
  • on the host being monitored, the user name used to authenticate has the following permission in /etc/sudoers file:
Defaults:monitor.user !requiretty
monitor.user ALL=NOPASSWD: /bin/cat /proc/*
Monitors description:
Nice priority: guest VM process priority adjustment, as if set by nice utility (19 means the least priority, -20 means the highest; 0 is default priority)
Threads used: how many threads uses VM guest process
Total data read (MB): total amount of data read from storage devices (since the moment the process exists)
Total data written (MB): total amount of data written to storage devices (since the moment the process exists)
Total inbound network traffic (MB): total amount of inbound data received from network (since the moment the process exists)
Total outbound network traffic (MB): total amount of outbound data sent over network (since the moment the process exists)
Virtual memory peak usage (MB): highest known virtual memory usage (since the moment the process exists)
Virtual memory swapped (VM): amount of virtual memory currently swapped out
Virtual memory used (MB): amount of virtual memory currently allocated

Important: in every template, please replace "vmname" parameter from monitor definition, set it to actual KVM "domain name" (virtual machine name, as reported by "virsh list" command).

Note: the template and underlying shell script are given as starting point to create more shell script-based monitors.

If an error occurs, text explanation is output by the script and non-zero return code sent, to indicate monitor failure.
Sign In or Register to comment.