Uipath Studio - How to get Information from machine, CPU, RAM

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+“%”

Get Ram Usage MB:
Assign: availableRamMB = Math.Round(
(CDbl(New Microsoft.VisualBasic.Devices.ComputerInfo().AvailablePhysicalMemory) /
CDbl(New Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory)) * 100,
2)

Log Message: “Available Ram:” + availableRamMB.ToString + “%”

Check Disk Space Used:
Assign: pDrive = Math.Round(
(CDbl(New System.IO.DriveInfo(“C”).AvailableFreeSpace) /
CDbl(New System.IO.DriveInfo(“C”).TotalSize)) * 100,2)
Log Message: "Free Disk Space: " + pDrive.ToString + “%”

Any other information needed from the logs just let me know!

I hope this help someone that was looking for this!

Hiii @Luis261980

Nice reference! :+1: 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.

Hi @MayureshOfficial_45 ,

I have posted based in what I needed for me.

but everyone can use this as they need, example of what you have here!

Thank you.

Thanks, @Luis261980

This is really helpful. :+1:
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.

Thanks again for sharing!