I have a library in Ruby that shells out to get memory usage of the current process, I just received a report that it doesn't work on Windows. On mac and linux I can shell out to ps -o rss= -p 3432
to get the RSS memory for process with a PID of 3432. Is there an equivalent command in Windows?
You can check memory of a process or a set of processes in human readable format (in KB or kilobytes) with pmap command. All you need is the PID of the processes you want to check memory usage of. As you can see, the total memory used by the process 917 is 516104 KB or kilobytes.
Check Computer Memory Usage EasilyTo open up Resource Monitor, press Windows Key + R and type resmon into the search box. Resource Monitor will tell you exactly how much RAM is being used, what is using it, and allow you to sort the list of apps using it by several different categories.
Not sure how linux measures RSS but in Windows for the working set size (the set of pages in the virtual address space of the process that are currently resident in physical memory) you can use WMIC to query WMI:
C:\>wmic process where processid=6884 get WorkingSetSize
WorkingSetSize
253448192
(Remove get WorkingSetSize
for a list of the available metrics)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With