From 5ebd9d273478f4c4aad32db2050fa18b7e21668f Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 23 Sep 2017 15:07:13 +0200 Subject: [PATCH] print VSS after service restart. only restart when using more than 6g --- modules/ganeti2/files/crazy-multipath-restart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1