WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Locking Console: A simple little script

To: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] Locking Console: A simple little script
From: Steve Spencer <sspencer@xxxxxxxx>
Date: Wed, 26 Nov 2008 07:15:30 -0600
Delivery-date: Wed, 26 Nov 2008 05:15:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20080925)
All,

A few people have reported this problem over time:  A machine that has
been up for awhile, you execute the console for a DomU and you type a
few characters and the system becomes unresponsive.  Everything on the
DomU is working, but you can't use the console.  The only way to fix
this is to find the running process id for the xenconsoled and kill it
and then restart the console.  The below script, written specifically
for a CentOS5.x Dom0, handles and simplifies this process.

On my machines, I've named this xencond, but it could obviously be named
anything you like.  I put it in /etc/rc.d/init.d/ as with all red-hat
ish scripts.  I can't take credit for the PGM (variable used in case the
script is renamed for some reason in the future)  or the reg expression
manipulation (done by a programmer here to remove the leading spaces on
a PID).  There is also no need for the echo line for nuke_id.  This was
put in for debugging purposes, and lazily I just haven't removed it.

If any of you find it useful, great.  If not, that's fine too:

script:

 #!/bin/bash

PGM=`basename $0`

# script to restart the xenconsole daemon
if [ "$1" = "" ]
then
        clear
        echo "###########################################################"
        echo "#                                                         #"
        echo "# Usage /etc/rc.d/init.d/$PGM restart   #"
        echo "#                                                         #"
        echo "###########################################################"
elif [ "$1" != "restart" ]
then
        echo "## just 'restart' is valid, sorry ##"
elif [ "$1" = "restart" ]
then
        nuke_id=`ps ax | grep xenconsoled | grep -v grep | sed -e "s/^ \+//" |
cut -d" " -f1`
        echo $nuke_id
        echo ...stopping xenconsole
        kill $nuke_id
        echo ...starting xenconsole
        /usr/sbin/xenconsoled
fi

Thanks,
-- 
Steven G. Spencer, Network Administrator
KSC Corporate - The Kelly Supply Family of Companies
Office 308-382-8764 Ext. 231
Mobile 308-380-7957

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Locking Console: A simple little script, Steve Spencer <=