From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kip Macy Subject: [PATCH] dump guest core if enable-dump true Date: Fri, 29 Apr 2005 23:05:42 -0700 Message-ID: Reply-To: Kip Macy Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org Self-explanatory # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/04/29 23:01:40-07:00 kmacy@curly.lab.netapp.com=20 # dump guest core if enable-dump is set # Signed-off-by: Kip Macy #=20 # tools/python/xen/xend/XendRoot.py # 2005/04/29 23:01:32-07:00 kmacy@curly.lab.netapp.com +3 -0 # add enable-dump check #=20 # tools/python/xen/xend/XendDomain.py # 2005/04/29 23:01:32-07:00 kmacy@curly.lab.netapp.com +2 -0 # dump core if enabled #=20 diff -Nru a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py --- a/tools/python/xen/xend/XendDomain.py 2005-04-28 23:08:40 -07:00 +++ b/tools/python/xen/xend/XendDomain.py 2005-04-28 23:08:40 -07:00 @@ -255,6 +255,8 @@ eserver.inject('xend.domain.exit', [name, id, reason]) self.domain_restart_schedule(id, reason) else: + if xroot.get_enable_dump() =3D=3D 'true': + xc.domain_dumpcore(dom =3D int(id), corefile =3D "/var/xen/dump/%s.%s.core"%(name,id)) eserver.inject('xend.domain.exit', [name, id, 'crash'])=20 destroyed +=3D 1 self.final_domain_destroy(id) diff -Nru a/tools/python/xen/xend/XendRoot.py b/tools/python/xen/xend/XendRoot.py --- a/tools/python/xen/xend/XendRoot.py 2005-04-28 23:08:40 -07:00 +++ b/tools/python/xen/xend/XendRoot.py 2005-04-28 23:08:40 -07:00 @@ -255,6 +255,9 @@ def get_network_script(self): return self.get_config_value('network-script', 'network') =20 + def get_enable_dump(self): + return self.get_config_value('enable-dump', 'false') + def get_vif_bridge(self): return self.get_config_value('vif-bridge', 'xen-br0')