Share via

How to retrieve the number of running applications/processes inside an Azure Virtual Machine

Sree Aravind M 20 Reputation points
2026-04-07T07:54:08.91+00:00

We need to identify how to get the number of running applications/processes inside an Azure Virtual Machine. Looking for supported approaches to retrieve this information from within the VM environment. This can include APIs, monitoring tools, agents, or any Azure-native solutions. The requirement is to programmatically or operationally determine active processes. Kindly provide the recommended and supported method to achieve this.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


1 answer

Sort by: Most helpful
  1. Alex Burlachenko 19,770 Reputation points MVP Volunteer Moderator
    2026-04-08T10:00:30.04+00:00

    Sree Aravind M hi and thx for stay with us at Q&A platform,

    yeah Azure itself doesnt know whats running inside ur VM. It only sees CPU, RAM, disk etc process list = inside guest OS only, so u got 3 real options, simplest run command inside VM

    linux

    ps -e --no-headers | wc -l
    

    windows

    (Get-Process).Count
    

    trigger via

    Azure Run Command

    SSH / RDP

    proper way (at scale) Azure Monitor Agent + Log Analytics, enable VM insights, then u can query processes

    example KQL

    InsightsMetrics

    | where Name == "Processes"

    or use process tables depending on config, this is the only “Azure-native” way to do it centrally

    third option custom script / agent. Deploy something that collects process count and pushes to

    Log Analytics

    App Insights

    or your API

    important there is no Azure API like: “give me process count for VM”

    bc Azure does not inspect inside OS unless agent is installed

    rgds,

    Alex

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.