16

I have been having very intermittent problems with an ASP.NET v 4.0 application happens maybe ever 4 days, what happens is the CPU will spike to 75% and sometimes is will run fine until the end of the day sometimes it will steadily grow to 100%

Then I have to reboot the server.

I have followed every guide on "What to do when worker process is at 100% CPU" and I know which worker process it is, which application pool it is. All i can do is find the process and kill it or recycle the app pool and that will sometimes help.

What i do not know is what is going on, on the system at that moment when CPU goes to 75%.

I wondering is there a way i can start procmon when CPU hits say 50% and run for 2 minutes, then shut down and save the data?

yagmoth555
  • 16,300
  • 4
  • 26
  • 48
Anthony Fornito
  • 9,526
  • 1
  • 33
  • 122

1 Answers1

2

Never did it, but easiest way would be by using alert in perfmon.

As you can see below, you can run a script when the action happen.

Select the Action tab, shown in Figure 3-18. You can now specify any of the following actions to happen when an alert is triggered: Log An Entry In The Application Event Log Creates log entries for alerts.

Send A Network Message To Sends a network message to the computer specified.

Run This Program Sets the complete file path of a program or script to run when the alert occurs.

More info there to set the alert

after in your script you could run it that way;

procmon /Quiet /Minimized /BackingFile log.PML
TIMEOUT /T 120
procmon /Terminate
yagmoth555
  • 16,300
  • 4
  • 26
  • 48