+ # the ouput of ps -o pid,command gives us <pid> bash <buildname>/run_log
+ def testmaster_buildname (self, ps_line):
+ chunks=ps_line.split()
+ path=chunks[2]
+ [buildname,command]=path.split('/')
+ return buildname
+
+ def handle_testmaster_box (self, box):
+ command=['pgrep','run_log']
+ if self.options.dry_run:
+ self.run_ssh(box,command,None)
+ else:
+ pids=self.backquote_ssh(box,command)
+ if not pids:
+ self.header ('No run_log process on %s'%box)
+ else:
+ self.header ("Active run_log processes on %s"%(box))
+ command=['ps','-o','pid,command'] + [ pid for pid in pids.split("\n") if pid]
+ ps_lines = self.backquote_ssh (box,command).split("\n")
+ for ps_line in ps_lines:
+ if not ps_line or ps_line.find('PID') >=0 : continue
+ print self.margin_outline(self.testmaster_buildname(ps_line)), ps_line
+
+