Create html chart for cpu usage processes on an RDS server

Hi,

I'd like to create a pie chart (https://canvasjs.com/javascript-charts/animated-chart/) of process on an Remote Desktop server (multiple users logged on) and their usage of CPU (later on memory). Reason: cpu is peaking at 80% and we would like to know which processes from which users are using most of cpu resources. This on a regular basis.

I'd like to retreive the data from the Windows machines via powershell, so I could start with get-process ....
Please advise on approach.

J.
janhoedtAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chinmay PatelChief Technical NinjaCommented:
Hi janhoedt,

I think you are already on the right track. User PowerShell

 
gwmi Win32_PerfFormattedData_PerfProc_Process | 
    ?{$_.Name -notmatch '_Total'} | 
    sort PercentProcessorTime -desc | 
    select | 
    ft -auto Name,IDProcess,PercentProcessorTime

Open in new window



Once you confirm that this data is right, we can save it to the disk by Out-File <<FileName>> You can use ConvertTo-Json to output directly as a JSON file.

The last step would be, to read that JSON file, and display it as a chart.

I was wondering, is it must for you to use PowerShell? would you be open to use any tool that can do this? I mean generating proper input file for the charting component.

Regards,
Chinmay.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.