#!/bin/sh # check_mk check f. LSI Controller # # 10/2010 Matthias Henze # Lizenz: GPL v2 # sampel output # 101 oracle stopped 1024 8.00 0 # 102 server running 3072 50.00 2634 # 103 monitoring running 2048 32.00 5139 # 104 nagios running 1024 32.00 9030 if which qm >/dev/null ; then echo '<<>>' qm list | grep -v VMID | while read L do PID=$(echo $L | awk -- '{print $6}') if [ $PID -gt 0 ]; then DATA=$(top -p $PID -n 1 -b | tail -n 1 | awk -- '{print $9" "$10}') else DATA="" fi echo $L" "$DATA done fi