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

Re: [Xen-users] Running scripts on domU create/shutdown?

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Running scripts on domU create/shutdown?
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Tue, 6 Mar 2007 14:38:25 +0000
Cc: Steve Kemp <steve@xxxxxxxxxxxx>
Delivery-date: Tue, 06 Mar 2007 06:37:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070305214528.GA17051@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <20070305214528.GA17051@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
Hi, Steve,

>   I'm working on the early design stages of a multi-dom0 xen
>  monitoring tool, (to replace my previous attempt "Argo").

Ah cool.  Argo looked quite funky to me, so it'll be interesting to see what 
you come up with.  Do you have a particular use case in mind that you're 
making this for?

>   One thing that would be very useful for a monitoring tool
>  would be the ability to run a script, or scripts, upon
>  dom0 events:
>
>     domU creation
>     domU shutdown

I've now replied to your e-mail commenting on technical issues on the 
xen-devel list.

Cheers,
Mark

>   Ideally /etc/xen/events/domU-up.d/* + domU-down.d/* or
>  similar.  (Running every executable the appropriate directory
>  with a single argument of the domain name would be sufficient
>  for my purposes.)
>
>   I've managed to write simple behavior for this by hacking
>  /etc/xen/scripts/vif-common.sh.  I can detect startup/shutdown
>  by looking at the first command line argument.
>
>   From there I can examine $XENBUS_PATH to get the ID of the
>  domain which is being created/destroyed - however there
>  isn't a simple mechanism that I've seen to get the domain
>  name.
>
>   So two questions:
>
>     1.  Is there a simple method to get the domain name
>        from the ID, short of parsing "xm list N"?
>
>     2.  Would this kind of startup/shutdown hook be useful
>        to others, and if so would a patch be applied?  (I'm
>        happy to submit my code.)
>
> Steve

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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