How to display the computer's current RAM usage with JavaScript?

1.9k views Asked by At

I want to make a Chrome extension to monitor CPU and RAM usage, but I can't find out how to get the current RAM usage of the computer. I searched on Google and didn't find anything. Eventually, I found this code below, and I tried it out to see if it works.

const ramUsage = window.performance.memory;

But this code just prints out the RAM usage of the current web page. Is there any way to print the computer's total RAM usage with JavaScript?

1

There are 1 answers

0
Robert On BEST ANSWER

i don't think so that you can check all available memory in system . system configuration is private information. if it would be available then all people with 4gb of ram would get advertisement with ram offer..... but in chorme there is flag : --enable-precise-memory-info