2

I have an ASP.NET app hosted in IIS, and I have automatic worker process recycling/shutdown disabled. I'd like to have a rough idea of how long the app has been running continuously without being re-loaded.

My thinking is that one source from which this can be gleaned is information about when the worker process was last recycled, perhaps in IIS logs or performance counters. Or alternatively, from information about when the AppDomain itself was created, perhaps in performance counters. Either way, I can't find any such information. Short of changing the code, is it possible to determine this for an already-deployed app?

Perhaps 3rd party tools that monitor processes? Or information from IIS in the event log?

Originally posted on SO: https://stackoverflow.com/questions/1835469/lifetime-of-worker-process-or-appdomain

G-Wiz
  • 125

2 Answers2

2

I'm not aware of any counter information for the AppDomain, but in perfmon, you can get the Process -> Elapsed Time which shows how long the app pool has been running.

Scott Forsyth
  • 16,599
0

I know you said you don't want to change any code, but if that is an option, you could just log the start time and process ID in the Application_Start event of your asp.net application. Then you have both the running time of your application and the app pool as a new PID means a recycled App pool.