diff --git a/opensvc/core/node/sunos.py b/opensvc/core/node/sunos.py index bb42f603fa..33533e2b3f 100644 --- a/opensvc/core/node/sunos.py +++ b/opensvc/core/node/sunos.py @@ -1,3 +1,5 @@ +import os +import threading import time from utilities.proc import justcall @@ -6,6 +8,10 @@ class Node(BaseNode): + @staticmethod + def get_tid(): + return "%s.%s" % (os.getpid(), threading.current_thread().ident) + def sys_reboot(self, delay=0): if delay: self.log.info("sysrq reboot in %s seconds", delay) diff --git a/opensvc/daemon/listener.py b/opensvc/daemon/listener.py index aac6adfa9f..3809a6bf0d 100644 --- a/opensvc/daemon/listener.py +++ b/opensvc/daemon/listener.py @@ -1781,6 +1781,7 @@ def router(self, nodename, data, stream_id=None, handler=None): translate into a method name, and execute this method with options passed as keyword args. """ + self.parent.stats.sessions.alive[self.sid]['tid'] = shared.NODE.get_tid() if not isinstance(data, dict): return {"error": "invalid data format", "status": 1} if "action" not in data: