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-changelog

[Xen-changelog] [xen-unstable] This patch add localtime to dumpcore file

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] This patch add localtime to dumpcore filename.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 17 Sep 2006 17:00:18 +0000
Delivery-date: Sun, 17 Sep 2006 10:01:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User root@procyon
# Node ID 30c659b655f15da7f6eeca68cd204162fbcf4733
# Parent  0008fca70351c348254398f67a66156272ad1731
This patch add localtime to dumpcore filename.
And it add '-imcomplete' if failed.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 0008fca70351 -r 30c659b655f1 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Sep 14 08:19:38 2006 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Sep 14 08:19:39 2006 +0100
@@ -982,11 +982,14 @@ class XendDomainInfo:
         
         try:
             if not corefile:
-                corefile = "/var/xen/dump/%s.%s.core" % (self.info['name'],
-                                                     self.domid)
+                this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
+                corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time,
+                                  self.info['name'], self.domid)
             xc.domain_dumpcore(self.domid, corefile)
 
         except:
+            corefile_incomp = corefile+'-incomplete'
+            os.rename(corefile, corefile_incomp)
             log.exception("XendDomainInfo.dumpCore failed: id = %s name = %s",
                           self.domid, self.info['name'])
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] This patch add localtime to dumpcore filename., Xen patchbot-unstable <=