Details of a thread in Powershell

This topic contains 2 replies, has 2 voices, and was last updated by  Ayan Mullick 4 years, 4 months ago.

  • Author
  • #12794

    Ayan Mullick

    How can I get the CPU consumption of all threads running in a process thru powershell, in a format similar to this.

    I can't find any processor information when I run

     (gwmi win32_thread)[0]

    . And the "Start Address" is numeric !?!

  • #12796

    Dave Wyatt

    You'll probably need to query performance counters for this information. Check out the Win32_PerfFormattedData_PerfProc_Thread class. It has (among other things), PercentPrivilegedTime, PercentUserTime, and PercentProcessorTime properties.

    "Start Address" is always numeric, but it's possible to translate that into funciton names by reading debug symbol files. I've never actually written code to do that, and can't offer much help there. This blog post might be a good place start:

  • #12825

    Ayan Mullick

    Currently, is there any command line utility to view the "Start address" of a thread as function names.

You must be logged in to reply to this topic.