I want to read the (accumulated) pagefaults of a process from the windows shell to decide when to kill it. The process will start dynamically.
I found the killing part (e.g. here: How to monitor and kill a process automatically on windows by process name) but I found no way to read the page faults. I tried pfmon.exe from the windows resource kits (installed rktools.exe although it raised a incompatibility warning) with taskmgr and it works - I tried it with MathKernel (the process in question and after I added it to PATH) and pfmon says it is not supported.
I know of tasklist but this only shows me cpu time and memory usage.
Is there another way to read page faults? Can the taskmanager be used somehow automatically?
This is related to my post about a problem in Mathematica here for which I couldn't find a solution (I tried the 1 answer there). My script runs 8 parallel Mathematica Kernels for a computation which takes ~10 hours and sometimes one or two of them block. I already restart them for each computation but the behaviour prevails. At the moment I check regularly with the taskmanager on them and kill MathKernel.exe processes which accumulate a lot of page faults. Note that processor time/load and memory usage are not helpful while the other MathKernel.exe processes are still running. That's why I need the page faults - I want to compare all 8 processes say every minute and if one has 10 times the page faults of the other I want to kill it.