Methods
_clearCache()
Clears the cache. Only necessary for testing.
_getAverageLoad(time) → {object}
Calculates the average CPU and RAM load for a given interval
Parameters:
Name | Type | Description |
---|---|---|
time |
number | One of the supported time frames in seconds |
Returns:
An object including the average for the given time
- Type
- object
(async) _getCPULoadRecord()
Calculates the current CPU utilization and adds it to the instance's CPU array
(async) _getRecord()
Fetches RAM utilization and saves it in the instance's array.
(async) _mergeConfigWithMachineInfos(machineObj, relevantPropertiesToReturn)
Adds some config value to the machine values. Note: Some properties can be set by both, the native machine and the native config module. E.g. 'output' and 'inputs' are determined from the machine but extended by the config values
Parameters:
Name | Type | Description |
---|---|---|
machineObj |
object | object containing the information from the native machine module; call-by-reference |
relevantPropertiesToReturn |
array | array containing the keys that needs to be returned |
(async) getMachineInformation(properties, The)
Returns information about the device
Parameters:
Name | Type | Description |
---|---|---|
properties |
Array.<string> | The property names that are to be read |
The |
Array.<object> | properties for the provided names |
(async) init()
Initializes the Machine-Manager component by reading the interval at which cpu and ram information should be fetched