CPU
In the Smart Home system, there is a “cpuspeed” plugin that provides CPU parameter display. The plugin grants access to the following parameters:
-
cores
: This parameter allows you to retrieve information about the number of CPU cores. It returns a number indicating the total number of CPU cores. -
mhz
: This parameter provides information about the current CPU frequency. It returns a value in megahertz (MHz) indicating the current operating frequency of the CPU. -
all
: Theall
parameter provides information about the weighted average CPU load in percentage. -
load_min
: This parameter displays the minimum CPU load over a specified period of time. It allows you to obtain information about the minimum CPU load and can be useful for monitoring and analyzing CPU load. -
load_max
: Theload_max
parameter provides information about the maximum CPU load over a specified period of time. It allows you to obtain information about the maximum CPU load and can be useful for analyzing system performance.
Here’s an example of using the “cpuspeed” plugin to retrieve CPU parameters:
const cpuParams = EntityGetAttributes('cpuspeed.cpuspeed')
console.log(cpuParams.cores);
console.log(cpuParams.mhz);
console.log(cpuParams.all);
console.log(cpuParams.load_min);
console.log(cpuParams.load_max);
You can use these parameters to display and monitor CPU information in your Smart Home project.