CPU

Hi, there are many ways we can get the current CPU % of the server, which one is recommended or easier , is it wmi,get-process or get-counter?, i want to see the current cpu usage as well as the top process which utilises the cpu more..

Get-WmiObject win32_processor |Measure-Object -property LoadPercentage -Average | Select Average  , i use this to select average and this

Get-WmiObject Win32_PerfFormattedData_PerfProc_Process | where-object{ $_.Name -ne "_Total" -and $_.Name -ne "Idle"} |   Sort-Object PercentProcessorTime -Descending | select -First 5 | select name,PercentProcessorTime

to select the top 5 , but is there a way of combining these 2 at the same time, kind of asynchronously and generate a table? or is there any other way of achieving this..

August 24th, 2015 12:43pm

Everything as a table:

get-counter '\Process(*)\% Processor Time' -ea 0|select -expand CounterSamples|sort CookedValue -desc |select -First 6

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 1:51pm

where will you find the current cpu usage from this , i dont think we can get that
August 25th, 2015 2:01am

looks like u deleted ur own thread after seeing the error...lol!!!
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 2:24am

No error.  The first record is the_total.

August 25th, 2015 2:30am

yeah i know, but it should be taken as error because of the words you had given to that post..lol!!!
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 2:32am

So you don't want a solution.  You want what?  I don't see what you find that is so funny.

August 25th, 2015 2:34am

i can find solution anywhere i want or even i can give. You wont give a solution without talking too much? lol!! strange
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 2:39am

That is why we have scripting. You need to write a solution.  I gave you an example.  You can use PowerShell and the counter CmdLets to gather and report information on processes.
August 25th, 2015 2:42am

Hi,

Thanks for the post, actullay, the script provided by jrv give the answer to you. You can check the output of the commands, it is what you wanted.

If you want it to list in a table you can try to export the output in a excel file.

Best Regards,

Elaine

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 6:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics