From 478f0891e038082fd986f78938d26b904b0e7f09 Mon Sep 17 00:00:00 2001 From: thierry Date: Tue, 26 Jan 2010 08:50:06 +0000 Subject: [PATCH] show build boxes uptime --- scripts/manage-infrastructure.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/manage-infrastructure.py b/scripts/manage-infrastructure.py index 4be91e4..ac8bd0f 100755 --- a/scripts/manage-infrastructure.py +++ b/scripts/manage-infrastructure.py @@ -58,16 +58,19 @@ class BuildBoxes: if not self.options.probe: self.reboot(box) else: + command=['ssh',self.root(box),'uptime'] + uptime=self.backquote(command).strip() + command=['ssh',self.root(box),'pgrep','build'] if self.options.dry_run: self.run(command,None) else: pids=self.backquote(command) if not pids: - self.header ('No build process on %s'%box) + self.header ('No build process on %s (%s)'%(box,uptime)) else: command=['ssh',self.root(box),'ps','-o','pid,command'] + [ pid for pid in pids.split("\n") if pid] - self.run(command,"Active build processes on %s"%box) + self.run(command,"Active build processes on %s (%s)"%(box,uptime)) vplc_matcher = re.compile(".*(vplc[0-9]+$)") def vplcname (self, vservername): -- 2.45.2