I am developing an ASP.Net Core MVC Application where an administrator e.g. me should be able to see system information like:
After digging for hours I only found solutions using some Performance Counters or system queries. The problem being that most of them only work under Windows, but I need them to work on Linux, to be specific Ubuntu 18.10, to work as well.
You can just execute linux command line the relevant programs to gather these info. You can even create a shell script to collect all of these info with one execution, and return them in a format that you can process.
The following commands should be enough to gather all the info.
ps -aux
: per process cpu and memory consumptionfree
: overall memory consumptiondf
: overall disk consumption