Finding most CPU intensive process

Welcome Forums General PowerShell Q&A Finding most CPU intensive process

This topic contains 3 replies, has 4 voices, and was last updated by

js
 
Participant
3 months, 2 weeks ago.

  • Author
    Posts
  • #104093
    YCE

    Participant
    Points: 0
    Rank: Member

    I know I could just use perfmon but I wonder whether there would be an easy Powershell way to find what process on my server is the most CPU intensive over a whole day? This would require finding out which hit the maximum usage but this wouldn't give a lear overall picture so also the same one was the greatest CPU user in total during the period? Would probing get-process be a good approach here?

  • #104108

    Participant
    Points: 5
    Rank: Member

    You have to setup some sort of data collector for this.
    The OS doesn't store performance information over time by default.

    The best way is to use something like perfmon, SCOM or other monitoring tools to gather the data.
    Of course you could use powershell together with e.g. perfmon to collect/query the performance information.
    You have cmdlets for it like Get-Counter.
    There are a number of articles about it out there, just search for "perfmon" "powershell".

  • #104146

    Participant
    Points: 16
    Rank: Member
  • #104177
    js

    Participant
    Points: 8
    Rank: Member

    No?

    ps | sort -Descending cpu | select -first 1

The topic ‘Finding most CPU intensive process’ is closed to new replies.