From: Peter Palfrader Date: Sat, 23 Sep 2017 13:07:13 +0000 (+0200) Subject: print VSS after service restart. only restart when using more than 6g X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=5ebd9d273478f4c4aad32db2050fa18b7e21668f;p=mirror%2Fdsa-puppet.git print VSS after service restart. only restart when using more than 6g --- diff --git a/modules/ganeti2/files/crazy-multipath-restart b/modules/ganeti2/files/crazy-multipath-restart index 6bf4f0b4f..5dd7492e8 100755 --- a/modules/ganeti2/files/crazy-multipath-restart +++ b/modules/ganeti2/files/crazy-multipath-restart @@ -39,8 +39,8 @@ for p in psutil.process_iter(): if parent.pid != 1: continue # used = p.memory_info().vms - if used > 4*1024**3: + if used > 6*1024**3: subprocess.check_call(['/usr/sbin/service', 'multipathd', 'restart']) - print("Did restart multipathd, one hopes.") + print("Did restart multipathd, one hopes. Virtual Memory Used: %d"%(used,)) except psutil.NoSuchProcess: pass