Skip to content

SlimIO/cpu-addon

Repository files navigation

cpu-addon

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)

Parent Name Description
NULL CPU "Central Processing Unit"
CPU CPU.${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

Key Value
model "Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz"
speed 2926

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

Name Refactoring Security Risk Usage
@slimio/addon Minor High Addon abstract class
@slimio/metrics Minor High Set metrics in DB
@slimio/units Minor Medium Bunch of units for metrics
@slimio/timer Minor Low Driftless interval

License

MIT

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •