From: thierry Date: Tue, 26 Jan 2010 08:50:06 +0000 (+0000) Subject: show build boxes uptime X-Git-Tag: foo~204 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=478f0891e038082fd986f78938d26b904b0e7f09;p=infrastructure.git show build boxes uptime --- 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):