Monitoring Background Processes
How do I reference a background process that is not found in the Sys process tree?
My test application is a front-end GUI linked to a back-end database running as a background process. I want to test for memory leaks of the background process. I can do this fine for the GUI because it appears in the process tree but cannot get a handle on the background process.
sub leakTest
'This works because myGUI is listed in the process tree
set myGUI = sys.waitprocess("MyGUI")
log.message ("GUI resource usage: Mem (" & myGUI.memUsage & ") CPU (" & myGUI.CPUUsage & ").")
'This fails because myBEP is not listed in the process tree -
'even though it is shown under background processes in the TaskManager
set myBEP = sys.waitprocess("MyBackEndProcess")
log.message ("Back End resource usage: Mem (" & myBEP.memUsage & ") CPU (" & myBEP.CPUUsage & ").")
end sub