This provides a dump of the compute consoles as well on failure.
Change-Id: Ib253537a54a1b9d83a930bbefa4512e039575fd1
| ... | ... |
@@ -18,6 +18,7 @@ |
| 18 | 18 |
|
| 19 | 19 |
import argparse |
| 20 | 20 |
import datetime |
| 21 |
+import fnmatch |
|
| 21 | 22 |
import os |
| 22 | 23 |
import os.path |
| 23 | 24 |
import sys |
| ... | ... |
@@ -97,6 +98,14 @@ def process_list(): |
| 97 | 97 |
"user,ppid,pid,pcpu,pmem,vsz,rss,tty,stat,start,time,args") |
| 98 | 98 |
|
| 99 | 99 |
|
| 100 |
+def compute_consoles(): |
|
| 101 |
+ _header("Compute consoles")
|
|
| 102 |
+ for root, dirnames, filenames in os.walk('/opt/stack'):
|
|
| 103 |
+ for filename in fnmatch.filter(filenames, 'console.log'): |
|
| 104 |
+ fullpath = os.path.join(root, filename) |
|
| 105 |
+ _dump_cmd("sudo cat %s" % fullpath)
|
|
| 106 |
+ |
|
| 107 |
+ |
|
| 100 | 108 |
def main(): |
| 101 | 109 |
opts = get_options() |
| 102 | 110 |
fname = filename(opts.dir) |
| ... | ... |
@@ -108,6 +117,7 @@ def main(): |
| 108 | 108 |
process_list() |
| 109 | 109 |
network_dump() |
| 110 | 110 |
iptables_dump() |
| 111 |
+ compute_consoles() |
|
| 111 | 112 |
|
| 112 | 113 |
|
| 113 | 114 |
if __name__ == '__main__': |