I have several websites running on my server.
I have a “diagnostic” page in the application that shows the amount of memory for the current process (very useful).
Now this application is “linked” to another application, and I want my diagnostic page to be able to display memory for another w3wp process.
To get the amount of memory, I use simple code:
var process = Process.GetProcessesByName("w3wp"); string memory = this.ToMemoryString(process.WorkingSet64);
How can I define my second w3wp process knowing its application pool?
I found the appropriate thread, but could not find a suitable answer: A reliable way to see statistics on specific processes in the IIS6 application pool
thanks
source share