How to get % CPU consumed by each user in a multi session VM without using powershell?

Singi Reddy Sreeja (CIS) 1 Reputation point
2021-03-04T06:41:25.057+00:00

Using log analytics KQL query on Perf table we can get CPU utilization for machine level but unable to find user wise CPU utilization. Perf | where CounterName == '% Processor Time' and ObjectName == 'Process' Using the above query we can %CPU vs process and using VMProcess table we get process vs user data. As process to user is not a one-to-one mapping, I realized that this way we can't get % CPU used by each user. Please suggest a way.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,168 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 43,801 Reputation points Microsoft Employee
    2021-03-05T07:48:18.947+00:00

    @Singi Reddy Sreeja (CIS) Welcome to Microsoft Q&A, Thank you for posting your query!

    Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.
    There is no way to fetch the User details in perf hence it is not directly fetched exactly you will have to capture such information via powershell or cron job and paste it to a file then collect that log file via custom logs that's the only workaround, no direct method to achieve your requirement

    If you wish and interested in this kind of feature, I would request you to post your feedback here. All the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure: https://feedback.azure.com/forums/34192--general-feedback

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments