Supervisor / superlance

Superlance utilities for use with the Supervisor process control system
http://supervisord.org
Other
455 stars 147 forks source link

FreeBSD issue finding processes #135

Open DejarW opened 3 months ago

DejarW commented 3 months ago

memmon was not able to find defined process on FreeBSD 13/14 I changed superlance/memmon.py self.pstreecommand to use multiply -o

I believe this will work also on Linux freebsd.patch

mnaberez commented 3 months ago

freebsd.patch

index 8be2478..04771b3 100644
--- a/superlance/memmon.py
+++ b/superlance/memmon.py
@@ -114,7 +114,7 @@ class Memmon:
         self.stdout = sys.stdout
         self.stderr = sys.stderr
         self.pscommand = 'ps -orss= -p %s'
-        self.pstreecommand = 'ps ax -o "pid= ppid= rss="'
+        self.pstreecommand = 'ps ax -o "pid=" -o "ppid=" -o "rss="'
         self.mailed = False # for unit tests

     def runforever(self, test=False):