From: Akio Takebe <takebe_akio@jp.fujitsu.com>
To: John Levon <levon@movementarian.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: xm dump-core options are useless
Date: Fri, 05 Sep 2008 11:09:39 +0900 [thread overview]
Message-ID: <48C094E3.2080201@jp.fujitsu.com> (raw)
In-Reply-To: <20080904234918.GA25194@totally.trollied.org.uk>
Hi, John
John Levon wrote:
> This cset:
>
> changeset: 11473:0008fca70351
> date: Thu Sep 14 08:19:38 2006 +0100
> description:
> xm dump command add on
>
> xm dump-core [-L|--live][-C| --crash] <domID> [output path]
>
> Didn't actually implement anything. Worse, it looks like we don't even
> pause the domain, so it's always live (not good). What's going on?
>
What do you mean? Why do you think "it looks like we don't even
pause the domain"? The following code of the patch looks like
we do pause domain by server.xend.domain.pause(dom).
+def xm_dump_core(args):
+ arg_check(args, "dump-core",1,3)
+ live = False
+ crash = False
+ import getopt
+ (options, params) = getopt.gnu_getopt(args, 'LC', ['live','crash'])
+
+ for (k, v) in options:
+ if k in ['-L', '--live']:
+ live = True
+ if k in ['-C', '--crash']:
+ crash = True
+
+ if len(params) == 0 or len(params) > 2:
+ err("invalid number of parameters")
+ usage("dump-core")
+
+ dom = params[0]
+ if len(params) == 2:
+ filename = os.path.abspath(params[1])
+ else:
+ filename = None
+
+ if not live:
+ server.xend.domain.pause(dom) <<< HERE
+
+ try:
+ print "dumping core of domain:%s ..." % str(dom)
+ server.xend.domain.dump(dom, filename, live, crash)
+ finally:
+ if not live:
+ server.xend.domain.unpause(dom)
+
+ if crash:
+ print "destroying domain:%s ..." % str(dom)
+ server.xend.domain.destroy(dom)
+
Best Regards,
Akio Takebe
next prev parent reply other threads:[~2008-09-05 2:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-04 23:49 xm dump-core options are useless John Levon
2008-09-05 2:09 ` Akio Takebe [this message]
2008-09-05 13:23 ` John Levon
2008-09-07 23:47 ` Masaki Kanno
2008-09-08 1:40 ` Akio Takebe
2008-09-05 7:36 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48C094E3.2080201@jp.fujitsu.com \
--to=takebe_akio@jp.fujitsu.com \
--cc=levon@movementarian.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.