pub.monitor.service:getList does seem to list finished instances of audited services only, but I cannot find the running instances with this service (or I’m wrongly setting my service audit settings).
Is there a way to get a list of running instances of a given service for a given timeframe ?
Look at the source code of the DSP that shows that information and you’ll know what service you have to use. DSPs are a great source of knowledge about some undocumented (but, in my experience, quite stable) services of the IS.
Yes, there is a way to do this. Build a wrapper around wm.server.query:getServiceStats and search for your service that is currently running (SvcStats/sRunning=1). Note that this service is internal and present in WmRoot (use it at your own risk). To view WmRoot package in package explorer via Designer set the IS extended setting watt.server.ns.hideWmRoot=false, after adding this setting refresh your designer session to view the WmRoot package.