Getting percentage CPU Time and owner for processes

Welcome Forums General PowerShell Q&A Getting percentage CPU Time and owner for processes

Viewing 2 reply threads
  • Author
    Posts
    • #206286
      Participant
      Topics: 23
      Replies: 15
      Points: 28
      Rank: Member

      I need to collect the pecentage of CPU time (percentage, not total CPU time ad displayed by command TASKLIST /V) for all the processes on a Windows server.

      I see I can get the values I need by using the command:

      wmic path Win32_PerfFormattedData_PerfProc_Process where “PercentProcessorTime > 0” get PercentProcessorTime, Name, idprocess

      However, I need to get 2 additional information: a timestamp with the time the command was executed, and the user associated with the process.

      Is there any sample I can start from?

      Regards

      marius

    • #206310
      Moderator
      Topics: 5
      Replies: 244
      Points: 1,387
      Helping Hand
      Rank: Community Hero

      Hi Marius,

      Did you search on Bing/Google? There are hell lot of answers for your requirement…

      https://stackoverflow.com/questions/39943928/listing-processes-by-cpu-usage-percentage-in-powershell

      Please go though the thread completely then you will get your answer.

      Still if you don’t understand anything please do let us know.

      Thank you.

    • #206361
      Participant
      Topics: 52
      Replies: 211
      Points: 890
      Helping Hand
      Rank: Major Contributor

      How about this?

       

       

Viewing 2 reply threads
  • The topic ‘Getting percentage CPU Time and owner for processes’ is closed to new replies.