| Server IP : 45.40.142.9 / Your IP : 216.73.216.250 Web Server : Apache System : Linux s45-40-142-9.secureserver.net 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : bayspec ( 506) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/udev/ |
Upload File : |
#! /bin/sh
if test -f /etc/sysconfig/kvm; then
. /etc/sysconfig/kvm
fi
: ${THRESHOLD:=0}
COUNT=$1
EVENT=$2
if [ "$THRESHOLD" -eq 0 ]; then
level=user.debug
else
level=user.info
fi
subscr_msg="your Red Hat Enterprise Linux subscription limit is $THRESHOLD"
subscr_msg="$subscr_msg guests. Please review your Red Hat Enterprise Linux"
subscr_msg="$subscr_msg subscription agreement or contact your Red Hat"
subscr_msg="$subscr_msg support representative for more information. You"
subscr_msg="$subscr_msg may review the Red Hat Enterprise subscription"
subscr_msg="$subscr_msg limits at http://www.redhat.com/rhel-virt-limits"
case $COUNT in
1) guests=guest ;;
*) guests=guests ;;
esac
case $EVENT in
create)
if [ "$THRESHOLD" -eq 0 ]; then
msg="$COUNT $guests now active"
elif [ $COUNT -gt "$THRESHOLD" ]; then
level=user.warning
msg="$COUNT $guests are currently active; $subscr_msg"
fi
;;
terminate)
if [ $COUNT -ge "$THRESHOLD" ]; then
msg="$COUNT $guests now active"
fi
;;
esac
if [ -n "$msg" ]; then
logger -p $level "KVM: $msg"
fi
exit 0