All of lore.kernel.org
 help / color / mirror / Atom feed
* watch event for die domain ?
@ 2005-09-10 14:15 NAHieu
  2005-09-10 23:53 ` Christian Limpach
  0 siblings, 1 reply; 3+ messages in thread
From: NAHieu @ 2005-09-10 14:15 UTC (permalink / raw)
  To: xen-devel

Hi,

I am writing a small application to watch for xenstore events. I want
to know when a specific domain shutdown or reboot. It is best to watch
it via xenbus interface, but how? Is there any event or node can give
me such an event?

If not, I must periodically scan the domains (using libxc interface)
to detect if a domain dies, but that is not as good as xenbus
approach.

Many thanks.
Hieu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: watch event for die domain ?
  2005-09-10 14:15 watch event for die domain ? NAHieu
@ 2005-09-10 23:53 ` Christian Limpach
  2005-09-11  1:26   ` Rusty Russell
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Limpach @ 2005-09-10 23:53 UTC (permalink / raw)
  To: nahieu; +Cc: xen-devel

On 9/10/05, NAHieu <nahieu@gmail.com> wrote:
> I am writing a small application to watch for xenstore events. I want
> to know when a specific domain shutdown or reboot. It is best to watch
> it via xenbus interface, but how? Is there any event or node can give
> me such an event?

You can have a watch on @releaseDomain, the watch will fire whenever
xenstored unmaps the store page it has mapped from the domain. 
There's also @introduceDomain for when xenstored maps the page after
the domain was created.

> If not, I must periodically scan the domains (using libxc interface)
> to detect if a domain dies, but that is not as good as xenbus
> approach.

Yeah, polling is definitely not the way to go ;-)

     christian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: watch event for die domain ?
  2005-09-10 23:53 ` Christian Limpach
@ 2005-09-11  1:26   ` Rusty Russell
  0 siblings, 0 replies; 3+ messages in thread
From: Rusty Russell @ 2005-09-11  1:26 UTC (permalink / raw)
  To: Christian.Limpach; +Cc: nahieu, xen-devel

On Sun, 2005-09-11 at 00:53 +0100, Christian Limpach wrote:
> On 9/10/05, NAHieu <nahieu@gmail.com> wrote:
> > I am writing a small application to watch for xenstore events. I want
> > to know when a specific domain shutdown or reboot. It is best to watch
> > it via xenbus interface, but how? Is there any event or node can give
> > me such an event?
> 
> You can have a watch on @releaseDomain, the watch will fire whenever
> xenstored unmaps the store page it has mapped from the domain. 
> There's also @introduceDomain for when xenstored maps the page after
> the domain was created.

Speaking of which, I have a patch which changes over introduce/release
to a write/rm in /tool/xenstored/domain/<id>, so this will combine
nicely, too.  (Part of the patch series to make xenstored restartable).

This is probably more generically useful, and avoids turning xenstored
into an event mechanism 8)

Cheers,
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-11  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-10 14:15 watch event for die domain ? NAHieu
2005-09-10 23:53 ` Christian Limpach
2005-09-11  1:26   ` Rusty Russell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.