From 737e94202fe635b7bd9ad59195352bb5dfe54817 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 12 May 2015 19:51:39 -0400 Subject: [PATCH] dump compute consoles on fail as well This provides a dump of the compute consoles as well on failure. Change-Id: Ib253537a54a1b9d83a930bbefa4512e039575fd1 --- tools/worlddump.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/worlddump.py b/tools/worlddump.py index 7f2614dcaa..d846f10025 100755 --- a/tools/worlddump.py +++ b/tools/worlddump.py @@ -18,6 +18,7 @@ import argparse import datetime +import fnmatch import os import os.path import sys @@ -97,6 +98,14 @@ def process_list(): "user,ppid,pid,pcpu,pmem,vsz,rss,tty,stat,start,time,args") +def compute_consoles(): + _header("Compute consoles") + for root, dirnames, filenames in os.walk('/opt/stack'): + for filename in fnmatch.filter(filenames, 'console.log'): + fullpath = os.path.join(root, filename) + _dump_cmd("sudo cat %s" % fullpath) + + def main(): opts = get_options() fname = filename(opts.dir) @@ -108,6 +117,7 @@ def main(): process_list() network_dump() iptables_dump() + compute_consoles() if __name__ == '__main__':