print VSS after service restart. only restart when using more than 6g
authorPeter Palfrader <peter@palfrader.org>
Sat, 23 Sep 2017 13:07:13 +0000 (15:07 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 23 Sep 2017 13:07:13 +0000 (15:07 +0200)
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