I see there are several node packages that allow you to look up a specific process's usage, such as https://www.npmjs.com/package/usage
I am trying to get the overall sever usage/stats (CPU and Memory), not just one specific process or another. Maybe even disk space usage.
I am currently unable to find anything like this, is this possible?
In the System Properties window, on the General tab, look under Computer for details about the computer's speed and memory. Example: CPU (processor speed) = 2.93GHz. RAM (memory) = 3.25 GB of RAM.
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.
Check resource usage in Task ManagerCtrl + Shift + Escape. Ctrl + Alt + Delete, and then click Task Manager from the options presented.
Press the Windows key , type task manager, and press Enter . In the window that appears, click the Performance tab. On the Performance tab, a list of hardware devices is displayed on the left side.
The native module os can give you some memory and cpu usage statistics.
var os = require('os'); console.log(os.cpus()); console.log(os.totalmem()); console.log(os.freemem())
The cpus() function gives you an average, but you can calculate the current usage by using a formula and an interval, as mentioned in this answer.
There is also a package that does this for you, called os-utils.
Taken from the example on github:
var os = require('os-utils'); os.cpuUsage(function(v){ console.log( 'CPU Usage (%): ' + v ); });
For information about the disk you can use diskspace
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