cpu-addon

August 22, 2019 ยท View on GitHub

SlimIO CPU Addon - Recolt metric about Central Processing Unit with help of the Node.js core module os.

Getting Started

This package is available in the SlimIO Package Registry and can be easily installed with SlimIO CLI.

$ slimio --add cpu-addon
# or
$ slimio --add https://github.com/SlimIO/cpu-addon

Design

This addon use the NodeJS API : os.cpus()

const os = require("os");

console.log(os.cpus());

Entity declaration

NULL parent entities are directly linked to the root computer entity (first entity declaration in the agent db)

ParentNameDescription
NULLCPU"Central Processing Unit"
CPUCPU.${id}"N/A"

CPU.${id} is duplicate for each logical CPU core

id start at 0

For each logical CPU core

Descriptors

  • model: string
  • speed : number (in MHz)

Example

KeyValue
model"Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz"
speed2926

Metrics

All metrics are in milliseconds and represents the spending time in mode

  • user: number
  • nice: number
  • sys: number
  • idle: number
  • irq: number

All metrics are collected every 5s by default

Dependencies

NameRefactoringSecurity RiskUsage
@slimio/addonMinorHighAddon abstract class
@slimio/metricsMinorHighSet metrics in DB
@slimio/unitsMinorMediumBunch of units for metrics
@slimio/timerMinorLowDriftless interval

License

MIT