Major and Breaking Changes

Major Changes - Version 6

Version 6 is a complete rewrite of the library in TypeScript, shipping typed declarations (.d.ts) for every function while keeping a consistent, promise-based API. It remains a zero-dependency node.js backend/server-side library (it will not run in a browser).

New Functions

New Attributes

Extended Windows Support

Fixes (open version 5 issues resolved in version 6)

Breaking Changes

Be aware, that the new version 6.x is NOT fully backward compatible to version 5.x ...

We modernized the library with a full TypeScript rewrite and made a few interface changes. Please review the list below and adapt your code:

Topic Old (V5) New (V6) Comments
time() synchronous await si.time() time() is now asynchronous
and returns a promise
version() synchronous await si.version() version() is now asynchronous too -
all functions are now async
callbacks si.cpu(data => { ...}) removed callbacks are no longer available -
use async / await (preferred) or promises
graphics() { controllers, displays } gpu()
displays()
graphics() was split into two functions,
each returning a plain array.
graphics() is still available as deprecated wrapper
battery() { hasBattery, ..., additionalBatteries } [{ ... }] battery() returns an array, one entry per battery.
Empty array without battery,
hasBattery and additionalBatteries removed
language JavaScript TypeScript typed .d.ts declarations are now
shipped for every function
module resolution deep require('.../dist/...') exports map
(both require and import)
only documented entry points are importable;
deep dist/... paths gone
Node.js >= 10.0 >= 20.0 minimum Node.js version is now 20.0
unsupported platforms null [], default object or '' array results return [], object results the default object (all fields present),
string results ''. inetLatency(), diskSpeed(), inetSpeed()
and processFocused() still return null when there is no result.
dockerInfo() returns the default object instead of {} when Docker is not available
dockerContainerProcesses() strings numbers pidHost, ppid, pgid, nice, rss, vsz
are now numbers (null if not available)
disksIO() wait times
total since boot
wait times
of the last interval
rWaitTime, wWaitTime, tWaitTime now report the wait time of the last interval in ms
and are null on the first call - same convention as rIO_sec (#1025)
currentLoad() iowait not counted iowait in total Linux: iowait ticks are now counted in the denominator (os.cpus() drops them) -
currentLoadIdle is lower by the iowait share, the categories add up to 100% again
osInfo() distro
base distribution
distro
flavor / derivative
Linux: e.g. Kubuntu instead of Ubuntu, Raspberry Pi OS instead of Debian GNU/Linux,
Fedora Linux (Silverblue) - adapt checks like distro === 'Ubuntu'
macOS temperature macos-temperature-sensor macos-smc Apple Silicon: install the optional package macos-smc for cpuTemperature(), fans(),
temperatureGpu in gpu() and the current frequency in cpuCurrentSpeed().
cpuTemperature() main is now the average of the CPU sensors (max the hottest one), chipset is null

Deprecated

The following functions were renamed for naming consistency or split. The old functions still work but will be removed in a future major version:

Modular Imports (new)

The whole library, a single operating system, or a single function can now be imported individually:

This keeps bundles small: unused operating-system implementations can be tree-shaken away.

Test Full Version 6 Functionality

If you want to see all function results on your machine, please head over to Testing section. We implemented a tiny test suite where you can easily go through all functions and test results on your machine without coding.

Major Changes - Version 5

New Functions

Breaking Changes

Be aware, that the new version 5.x is NOT fully backward compatible to version 4.x ...

We had to make several interface changes to keep systeminformation as consistent as possible. We highly recommend to go through the complete list and adapt your own code to be again compatible to the new version 5:

Function Old New (V5) Comments
unsupported values -1 null values which are unknown or unsupported
on platform
battery() hasbattery
cyclecount
ischarging
designedcapacity
maxcapacity
acconnected
timeremaining
hasBattery
cycleCount
isCharging
designedCapacity
maxCapacity
acConnected
timeRemaining
pascalCase conformity
blockDevices() fstype fsType pascalCase conformity
cpu() speedmin
speedmax
speedMin
speedMax
pascalCase conformity
cpu().speed
cpu().speedMin
cpu().speedMax
string values now returning
numerical values
better value handling
cpuCurrentspeed() cpuCurrentSpeed() function name changed
pascalCase conformity
currentLoad() avgload
currentload
currentload_user
currentload_system
currentload_nice
currentload_idle
currentload_irq
raw_currentload
avgLoad
currentLoad
currentLoadUser
currentLoadSystem
currentLoadNice
currentLoadIdle
currentLoadIrq
rawCurrentLoad
pascalCase conformity
dockerContainerStats() mem_usage
mem_limit
mem_percent
cpu_percent
cpu_stats
precpu_stats
memory_stats
memUsage
memLimit
memPercent
cpuPercent
cpuStats
precpuStats
memoryStats
pascalCase conformity
dockerContainerProcesses() pid_host pidHost pascalCase conformity
graphics().display pixeldepth
resolutionx
resolutiony
sizex
sizey
pixelDepth
resolutionX
resolutionY
sizeX
sizeY
pascalCase conformity
networkConnections() localaddress
localport
peeraddress
peerport
localAddress
localPort
peerAddress
peerPort
pascalCase conformity
networkInterfaces() carrier_changes carrierChanges pascalCase conformity
processes() mem_vsz
mem_rss
pcpu
pcpuu
pcpus
pmem
memVsz
memRss
cpu
cpuu
cpus
mem
pascalCase conformity
renamed attributes
processLoad() result as object result as array of objects function now allows to provide more than
one process (as a comma separated list)
services() pcpu
pmem
cpu
mem
renamed attributes
vbox() HPET
PAE
APIC
X2APIC
ACPI
IOAPIC
biosAPICmode
TRC
hpet
pae
apic
x2Apic
acpi
ioApic
biosApicMode
rtc
pascalCase conformity

I know, these are a lot of changes, but for the sake of a consistent interface and to be future proof, we think that this was necessary. Thank you for your understanding.

Other Improvements and Changes

Test Full Version 5 Functionality

If you want to see all function results on your machine, please head over to Testing section. We implemented a tiny test suite where you can easily go through all functions and test results on your machine without coding.

Major Changes - Version 4

New Functions

Breaking Changes

Other Changes

Be aware, that the new version 4.x is NOT fully backward compatible to version 3.x ...

Major Changes - Version 3


Full Version History

Full version history (every single release version from version 1.x.x to 5.x.x) can be viewed here