Often times when you are looking at your environment from a performance perspective – perhaps you are testing or perhaps you are only trying to find out which host is responsible for the process running at 100% for 5 minutes – you need to know which BizTalk process has been started by what host. Another common reason is to know which service to attach to when debugging. There are a couple of ways to know this, and which one is best is both preference and related to environment and scenario. Regardless of scenario I prefer to start as few, quick and small applications as possible. I’ve put what I consider the best options in the order which is my preference.
Use the tasklist command in a command window: tasklist /svc /fi “imagename eq btsntsvc.exe”
View the BizTalk:Messaging ID Process perfomance counter in a command window: typeperf “BizTalk:Messaging(*)ID Process” -sc 1
I’m sure there are several more ways to do this… as I mentioned, it’s a matter or preference.
If you want to add this as an External Tool in Visual Studio to have it easily accessible for when you want to attach a host process to debug you can add it like this:
Of course, you could just always attach to all hosts. If you want to do this or not depends on the number of hosts you have running among other things, but why do so if you don’t need to?