print VSS after service restart. only restart when using more than 6g
[mirror/dsa-puppet.git] / modules / ganeti2 / files / crazy-multipath-restart
index 6bf4f0b..5dd7492 100755 (executable)
@@ -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