I am trying to fix a problem on one of our websites, which causes the processor to skip periodically. The site is located on a web server farm, and it periodically occurs on all servers at different times. The process causing the surge is w3wp.exe. I checked all the obvious things and now I want to analyze several sets of dump files for w3wp.exe, which causes a splash.
I am trying to automatically generate a dump file of the w3wp.exe process when it reaches the specified CPU threshold for a certain time.
I can use ProcDump.exe for this, and it works with pleasure if it fires before the PID (Process ID) changes.
For example: procdump -ma -c 80 -s 10 -n 2 5844 (where 5844 is the PID)
- -ma Write a dump file with all the process memory. The default dump format includes stream and descriptor information.
- -c CPU threshold at which a process dump is created.
- -s Sequential seconds, the CPU threshold should be removed before the dump (10 by default).
- -n The number of dumps to write before exiting.
The above command will track the w3wp.exe file until the processor drops by 80% in 10 seconds and it takes a full dump for at least two iterations.
Problem:
I have several instances of w3wp.exe, so I can not use the process name, I need to specify the PID. The PID changes every time the application pool is processed. This causes the PID to change before I can capture multiple dump files. Then I need to run procdump again on each web server.
My question is:
How can I automatically create dump files even after changing the PID?
source share