When working with remote systems, it can be useful to know the status of the server. For example, it can be beneficial to know when a machine has run out of memory, or whether it is spending a lot of time doing computationally expensive work. In this recipe, we'll look at how we can use Node.js and Highcharts to understand a system's CPU and RAM usage graphs.
To set up a basic Node.js project and its dependencies, refer to the Getting Ready section of the Exploring hard drive usage recipe from this chapter.
To get started, perform the following steps:
app.use(express.static('static')); app.get('/cpu/', function(request, ...