get-loadavg
returns the load average for the Unix-like systems but in an object
api
returns an object with the following properties:
- idle % of CPU idle of the time - this property should be returned when the load is below the number of CPUs
- overload % of CPU overloaded on average - this property should be returned when the load is above the number of CPUs
- processes % of processes were waiting for the CPU - this property should be returned when the load is above the number of CPUs
example
const getLoadAvg = // let's suppose that the current loadavg is [9.19921875, 5.2197265625, 3.16796875] and we have 4 CPUs// should return one: overload: 51992 processes: 52 five: overload: 12197 processes: 122 fifteen: idle: 208