For a conversion project at a customer with 4000 custom programs written over 30 years we're trying to get a handle on which programs are actively used. One idea that's been floated is running a monitoring program as root from the demo account that does the pseudo code below.
By definition we'll be running this in production for a month or three, and there's some justified nervousness about any potential performance impacts. I don't think the monitoring program will be a performance hog itself, but not sure if doing PORT.STATUS on the probed program has any effect - does it "pause" the probed program so the stack collected is consistent for example? We're not expecting to get 100% coverage from this, but even 80% would be a huge help.
Anyone ever done something like this for real? Any war stories or hard-won words of wisdom to share? Thanks for reading!
LOOP
EXECUTE 'LISTUSER'
LOOP FOR EACH ROW IN LISTUSER
RUN "PORT.STATUS PID <ROW.PID> CALL.STACK
PARSE THE CALL STACK, EXTRACT PROGRAM NAMES
WRITE NEW PROGRAM NAMES TO A LOG FILE
REPEAT
REPEAT