UiPath Studio - How to get Information from machine, CPU, RAM…
Tested on UiPath Cummunity
I have seen a lot of people requesting this information on UiPath forum and web so I´m sharing how to get some information from the machine using UiPath studio!
All the information below you can get basicly with available dependencies or activities.
Get username from machine:
“User Name:” + Environment.UserName
Get Machine Name:
“Machine Name:” + Environment.MachineName
Get CPU Usage
“CPU Usage is at:” + Environment.ProcessorCount.ToString+“%”
Nice reference! One small clarification: Environment.ProcessorCount returns the number of logical processors/CPU cores, not the current CPU utilization percentage.
If the goal is to get actual CPU usage, you can use PerformanceCounter (for example, Processor(_Total)\% Processor Time) and read its value.
Also, the RAM calculation shown is the available RAM percentage, not RAM usage percentage. Similarly, the disk calculation represents free disk space percentage.
So the log labels could be:
CPU: Processor count vs. actual CPU utilization
RAM: Available RAM %
Disk: Free disk space %
This distinction can be useful when using these values for VM health checks or monitoring thresholds.
This is really helpful.
I appreciate you sharing the approach and the clear examples for getting CPU, RAM, and disk information in UiPath Studio. I’ll definitely find this useful for machine health checks and monitoring scenarios.