0

I am using ProcDump to catch high cpu on server. I suspect its cause by one of the iis websites.

$processes = Get-Process -Name w3wp
foreach ($process in $processes) { D:\Server_Tools\Procdump\procdump.exe -c 30 -s 15 -ma $process.ID }

From what I understated, the code I have will triggers a dump if cpu for any w3wp process hit 30%.

My issue is that from current dump file I can not know which IIs website casued the issue.

How can I add the application pool name or something that will help me pin point the issue?

Thanks

Shraga
  • 23
  • 5
  • 1
    You can use any of the answers [here](https://stackoverflow.com/q/7014536/4137916) to set up a mapping from PIDs to app pool ids and use that in your dump name. Note that because `procdump` will not exit until it's got something to dump, your loop is actually only ever watching the first process (and then the next one, if it's still around). You'd need something like `Start-Job` to get those dumps to run in parallel. – Jeroen Mostert May 29 '18 at 10:49
  • Thanks for you reply. As I a new to this any chance you can assist with the code as I do not understand how they get from process ID to app pooll name. As I need it the app pool name when it creates the dump. IF cpu goes high I might restart server and then the PID change so wont be able to go back and match. – Shraga May 29 '18 at 12:07

0 Answers0