direct-io.hg

changeset 11474:30c659b655f1

This patch add localtime to dumpcore filename.
And it add '-imcomplete' if failed.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author root@procyon
date Thu Sep 14 08:19:39 2006 +0100 (2006-09-14)
parents 0008fca70351
children 11645dda144c
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Sep 14 08:19:38 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Sep 14 08:19:39 2006 +0100
     1.3 @@ -982,11 +982,14 @@ class XendDomainInfo:
     1.4          
     1.5          try:
     1.6              if not corefile:
     1.7 -                corefile = "/var/xen/dump/%s.%s.core" % (self.info['name'],
     1.8 -                                                     self.domid)
     1.9 +                this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
    1.10 +                corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time,
    1.11 +                                  self.info['name'], self.domid)
    1.12              xc.domain_dumpcore(self.domid, corefile)
    1.13  
    1.14          except:
    1.15 +            corefile_incomp = corefile+'-incomplete'
    1.16 +            os.rename(corefile, corefile_incomp)
    1.17              log.exception("XendDomainInfo.dumpCore failed: id = %s name = %s",
    1.18                            self.domid, self.info['name'])
    1.19