Finding most CPU intensive process

This topic contains 3 replies, has 4 voices, and was last updated by  js 1 week, 2 days ago.

  • Author
    Posts
  • #104093

    YCE
    Participant

    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

    Fredrik Kacsmarck
    Participant

    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

    postanote
    Participant
  • #104177

    js
    Participant

    No?

    ps | sort -Descending cpu | select -first 1

You must be logged in to reply to this topic.