22

I'm trying to find a tool similar to the Windows Task Manager utility which can show details on all threads running in a given process, such as their names, IDs, etc ..

Windows Task Manager only lists the number of threads running in a given process .. It doesn't give any thread specific information ..

Ahmad
  • 12,886
  • 30
  • 93
  • 146
  • Open windows task manager select view -> select columns to add more details such as PID (process ID), etc – BigChief Oct 02 '15 at 12:57

3 Answers3

20

Try using Process explorer. It's much more powerful than task manager and should suit your needs.

darioo
  • 46,442
  • 10
  • 75
  • 103
  • if i have thread in asp.net website ..How i can see the thread using process explorer ex:OrderStatusFromThread.IsBackground = true; OrderStatusFromThread.Name = "OrderStatusFromThread"; OrderStatusFromThread.Start(); – Mohamad Mahmoud Darwish Jul 04 '14 at 13:54
  • You can see different process on the list. When you hover you see the exe. args as well. But for threads you just need to `double click on a process and go to Threads tab`. Multiprocess application and multithread application are different. I coded a concurrent application which prints executing thread number on the screen and I can see my threads on this app. – Davut Gürbüz Apr 10 '15 at 08:03
  • @MohamadMahmoud For Asp.NET ,if you use asp.net IIS uses `thread pool` and manages threads innerly. You do not need to show an extra effort for managing threads. Thus it's not recommended using Application object because it's shared and cause many locks. We use session objects for different users which also use locks as well but without locking Application object and using a lock for a particular client.This means better performance for web apps. – Davut Gürbüz Apr 10 '15 at 08:09
  • doesn't seem to include the thread name.... – Jason S Oct 24 '17 at 21:19
10

You can also try processHacker which is free, Open source and mature.It has more option than ProcessExplorer.

Malick
  • 6,252
  • 2
  • 46
  • 59
  • This one works out of the box on Win 10 compared to ProcessExplorer which needs the Debugging tools. Great! – qwertzguy Aug 24 '17 at 20:42
  • This one worked for me also on windows 7, process Explorer pops error message (Missing function: winsta!WinStationConnectW),..... processHacker worked perfectly with no problem, thanks for sharing. – user1477332 Feb 08 '20 at 20:30
  • Symantec Endpoint Protection mentions this tool not to be safe. – Dominique Nov 02 '21 at 08:47
2

THREAD DETAILS

As darioo has already commented, applications like Process Explorer from Microsoft (previously: System Internals) can provide additional information about an application's threads:

  • ThreadId
  • Kernel Time
  • User Time
  • Starting address
  • Current State
  • Context Switches
  • etc.

Process Explorer can be downloaded for free from here.

THREAD NAME

The original question also inquired about determining a thread's name.

It is my understanding that the Windows operating system does not support the concept of a thread having a name. This concept only exists within the Visual Studio development environment.

If this is true, then another option to get a thread's name at run-time is print it out along with your debug/log messages. At the very least, you can use this approach to keep track of thread lifetime. For example:

2015/06/02 14:22:17 CoreEngine Quality Assurance thread is initializing... ThreadId=123
2015/06/02 14:22:17 CoreEngine Quality Assurance thread has initialized successfully. ThreadId=123
...
2015/06/02 16:68:17 CoreEngine Quality Assurance thread is terminating... ThreadId=123
2015/06/02 16:68:18 CoreEngine Quality Assurance thread has terminated successfully. ThreadId=123

Additional References #

Community
  • 1
  • 1
Pressacco
  • 2,815
  • 2
  • 26
  • 45