Logic Machine Forum
get scriptname from PID - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: get scriptname from PID (/showthread.php?tid=1227)



get scriptname from PID - gjniewenhuijse - 09.02.2018

I see in my processes app that process 992 uses lot of resources.

In the system config i see: 992 lua /lib/genohm-scada/core/scripting-resident.lua 72

But how i know what resident script this is?


RE: get scriptname from PID - Daniel - 09.02.2018

(09.02.2018, 10:29)gjniewenhuijse Wrote: I see in my processes app that process 992 uses lot of resources.

In the system config i see: 992 lua /lib/genohm-scada/core/scripting-resident.lua 72

But how i know what resident script this is?

Hi
You can run this in the script to get it's PID nr

Code:
pid = os.getpid()



RE: get scriptname from PID - admin - 09.02.2018

72 is script id, editor URL is http://LM_IP/scada-main/main/editor?id=72


RE: get scriptname from PID - gjniewenhuijse - 09.02.2018

thanks