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
- camera() detected cameras
- keyboard() detected keyboards
- mouse() detected pointing devices
- thunderbolt() Thunderbolt controllers and devices
- pci() PCI devices (experimental)
- npu() detected NPUs / AI accelerators (experimental)
- software() installed software / applications
- npm() globally installed npm packages
- gpu() graphics controllers (replaces the controllers part of graphics())
- displays() monitors / displays (replaces the displays part of graphics())
- inetPublicIp() public IPv4 / IPv6 address (#731)
- serialPorts() detected serial / COM ports incl. USB adapters (device, name, manufacturer, serialNumber, vendorId, productId, pnpId, type; Linux via sysfs, macOS via ioreg, Windows via Win32_PnPEntity)
New Attributes
- osInfo() added installDate (operating system installation date)
- osInfo() added displayServer (wayland, x11, quartz, dwm, surfaceflinger or '' when headless)
- osInfo() added lastUpdate (date of the last OS update on macOS / Windows, last package update on Linux / BSD, #970)
- osInfo() added hwAcceleration (available compute layers: cuda, rocm, oneapi, vulkan, opencl, metal, dx12, directml, #980)
- osInfo() added awake (system fully awake - false during macOS dark wake, #987)
- bios() added iBridge (Apple iBridge / security chip: modelName, build, bootUuid, secureBoot - macOS only)
- displays() added serial, displayId and productionYear on Windows (previously macOS only)
- displays() added RDP as connection type for remote desktop / indirect displays (Windows)
- displays() added mirror (true if the display is part of a mirrored / duplicated set, #930)
- displays() added scale (DPI scaling factor of the display, e.g. 1.5 for 150% - Windows only)
- fans() new function - detected fans with rpm and pwm (Linux via hwmon / thermal cooling devices; Windows only with a running LibreHardwareMonitor / OpenHardwareMonitor; macOS as soon as macos-temperature-sensor exposes the SMC fan keys)
- gpu() added temperatureGpu on Apple Silicon (optional macos-temperature-sensor package)
- cpuTemperature() added support for the macos-temperature-sensor package (Apple Silicon, incl. chipset / SoC temperature)
- os() added installDate, displayServer
- services() added startmode on Linux (systemd UnitFileState: enabled, disabled, static, ..., previously Windows only)
- services() added lastChanged (Linux/systemd: date of the last state change - service start when running, service stop otherwise; macOS: start time of the service processes, #886)
- processes() added cpuTime (absolute CPU time of the process itself in seconds, excluding already reaped children, #1007)
- processes() now reports zombie processes with their plain name instead of name] <defunct>
- currentLoad() added currentLoadIowait / rawCurrentLoadIowait and per CPU loadIowait / rawLoadIowait (CPU time waiting for IO, the wa value of top) - Linux only, 0 elsewhere (#965)
- versions() added angular, cargo, composer, curl, dockerCompose, go, gradle, herd, laravel, podman, rails, ruby, rust, sqlite3, vim, vue
Extended Windows Support
- disksIO(), fsStats(), fsOpenFiles() and thunderbolt() are now also available on Windows
- blockDevices() added guid (volume GUID path, e.g. \\?\Volume{...}\ - needed to mount a volume, #856)
- disksIO() added rWaitTime, wWaitTime, tWaitTime, rWaitPercent, wWaitPercent and tWaitPercent on Windows (previously Linux / BSD only)
Fixes (open version 5 issues resolved in version 6)
- fsSize() the file system type on macOS is now read from mount instead of being guessed from diskutil - the guess could only ever produce APFS, HFS or NFS, so APFS volumes were reported as HFS and zfs, exfat, msdos or smbfs were never recognised at all. This also makes the ZFS correction work on macOS (#1017)
- fsSize() ZFS datasets now report the hierarchical usage from zfs list - df and statfs only know what a dataset references itself, so a parent holding its data in child datasets was shown as almost empty (#1017) - note that used then includes child datasets and snapshots, exactly like zfs list, so it must not be summed across nested datasets
- displays() EDID parsing with multiple monitors - all displays reported the first monitor's model, resolution and size (Linux, #997)
- displays() display positions (positionX / positionY) are now parsed from xrandr (Linux, #866)
- displays() per-display refresh rate instead of copying the primary monitor's rate to all displays (Windows, #853)
- displays() resolutionX/Y, currentResX/Y, positionX/Y are now physical pixels read from EnumDisplaySettings - Forms.Screen bounds are DPI scaled and mixed scaled sizes with unscaled positions, so a scaled monitor reported a wrong resolution and pushed all other monitors to wrong positions (Windows)
- displays() monitor data (connection type, size) is now correlated by InstanceName - fixes swapped values on multi-GPU setups (Windows, #764)
- displays() mirrored/duplicated monitors are now reported as separate physical displays; monitors that are attached but inactive (e.g. "PC screen only") are not listed (Windows, #940)
- displays() and gpu() share the result of their common base query when called in parallel (e.g. via getStaticData()) - the expensive system_profiler (macOS) / win32_VideoController (Windows) call runs only once
- displays() vendor/model fallback from Win32_DesktopMonitor is now matched per display via PNPDeviceID - previously only the first entry was considered (Windows, idea from #855)
- diskLayout() virtual disks (e.g. KVM/virtio on VPS) are no longer dropped - the filter no longer requires a non-zero disc-max; pseudo devices (ram, zram, loop, dm-, nbd) are excluded by name instead (Linux, #919)
- services() state, start mode and PIDs are now read from systemd instead of guessing them by matching service names against the process list - fixes services reported as not running when the process name differs from the unit name (e.g. php8.4-fpm -> php-fpm) and partial name matches reporting a foreign service as running (Linux, #899, #818)
- networkInterfaces() lists interfaces without an assigned IP address too - os.networkInterfaces() skips those, so e.g. an unplugged or unconfigured NIC was missing (Linux, #903, #355, #632)
- networkInterfaces() reports type (wired / wireless) while the link is down as well - previously unknown, unlike Windows and macOS (Linux, #632)
- networkInterfaces() adapters are matched by connection name instead of MAC address - a docking station mirroring the MAC of the internal NIC made one of the two disappear and mixed up their data (Windows, #762)
- networkInterfaces('default') no longer returns an incomplete list when the default interface is not the first one (macOS/BSD)
- networkInterfaces() queries nmcli device status once per call instead of once per interface (Linux)
- audio() falls back to ALSA (/proc/asound) when no PCI audio device is found - ARM boards like the Raspberry Pi have no PCI bus, so lspci returned nothing and the result was always empty (Linux, #545)
- networkStats() results keep the queried interface name - cached results (within 500 ms) and results for unknown interfaces returned an empty iface (#779)
- networkStats() interfaces without traffic (e.g. a link-local only adapter) now return their stats and operstate instead of an empty result (Windows, #779)
- networkStats() rx_dropped, rx_errors, tx_dropped and tx_errors are no longer lost in cached results
- gpu() reads clock, temperature, power, utilization and memory from DRM sysfs (/sys/class/drm/card*) - runtime values for Intel and AMD GPUs without extra tools or root, previously nvidia-smi only (Linux, #890)
- wifiConnections() connection details are now queried by NetworkManager connection UUID instead of the connection name - fixes wrong data when the name differs from the SSID or contains spaces (Linux, #872)
- get() returns a migration hint for the removed graphics key instead of silently dropping it
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 removed and split into two functions, each returning a plain array. get() returns a migration hint for the removed graphics key |
| 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 | older versions | >= 20.0 | minimum Node.js version is now 20.0 |
Modular Imports (new)
The whole library, a single operating system, or a single function can now be imported individually:
- disksIO() rWaitTime, wWaitTime and tWaitTime now report the wait time of the last interval in ms instead of the total since boot, and are null on the first call - same convention as rIO_sec (#1025)
- currentLoad() on Linux now counts iowait ticks in the denominator, which os.cpus() drops entirely - currentLoadIdle is now lower by exactly the iowait share while currentLoad is almost unchanged, and the categories add up to 100% again
- require('systeminformation') - whole library (all functions, all platforms)
- require('systeminformation/cpu') - a single function (platform detected at runtime)
- require('systeminformation/linux') - a whole operating system (/darwin, /windows, /bsd, /sun)
- require('systeminformation/linux/cpu') - a single function of a single operating system
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
- audio() detailed audio information
- bluetoothDevices() detailed information detected bluetooth devices
- printers() detailed printer information
- usb() detailed USB information
- wifiInterfaces() detected Wi-Fi interfaces
- wifiConnections() active Wi-Fi connections
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
- baseboard(): added memMax, memSlots
- bios(): added language and features (linux)
- cpu(): extended AMD processor list
- cpu(): extended socket list (win)
- cpu(): added virtualization if cpu supports virtualization
- cpu(): now flags are part of this function
- cpuTemperature(): added socket and chipset temperature (linux)
- disksIO(): added waitTime, waitPercent (linux)
- fsSize(): added available
- fsSize(): improved calculation of used
- getData(): support for passing parameters and filters (see section General / getData)
- graphics(): extended properties macOS
- graphics(): extended nvidia-smi parsing
- networkInterfaces(): type detection improved (win - wireless)
- memLayout(): extended manufacturer list (decoding)
- memLayout(): added ECC flag
- osInfo(): better fqdn (win)
- osinfo(): added hypervizor if hyper-v is enabled (win only)
- system(): better Raspberry PI detection
- system(): added virtual and virtualHost (if system is virtual instance)
- uuid(): better value support
- uuid(): added MACs
- uuid(): better Raspberry Pi hardware ID
- versions(): added bash, zsh, fish, powershell, dotnet
- Apple M1 Silicon extended support
- updated TypeScript definitions
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 resuls on your machine without coding.
Major Changes - Version 4
New Functions
- chassis() chassis information
- vboxInfo() detailed virtualBox VM information
- wifiNetworks() detailed information about available wifi networks
Breaking Changes
- networkStats(): will provide an array of stats for all given interfaces. In previous versions only one interface was provided as a parameter. Pass '*' for all interfaces
- networkStats(): rx and tx changed to rx_bytes and tx_bytes
- dockerContainerStats() will provide an array of stats for all given docker containers. In previous versions only one interface was provided as a parameter. Pass '*' for all docker containers
Other Changes
- system(): optimized system detection (e.g. new Raspberry Pi models, ...)
- system(), bios(), baseboard(): information also as non-root (linux)
- graphics(): added pip, pip3, virtualBox,
- versions(): better controller and display detection, fixes
- networkInterfaces(): optimization, fixes
- networkStats() added operstate, type, duplex, mtu, speed, carrierChanges
- added TypeScript definitions
Be aware, that the new version 4.x is NOT fully backward compatible to version 3.x ...
Major Changes - Version 3
- works only with node.js v4.0.0 and above (using now internal ES6 promise function, arrow functions, ...)
- Promises. As you can see in the documentation, you can now also use it in a promise oriented way. But callbacks are still supported.
- Async/Await. Due to the promises support, systeminformation also works perfectly with the `async/await` pattern (available in node.js v7.6.0 and above). See example in the docs.
Full Version History
Full version histrory (every single release version from version 1.x.x to 5.x.x) can be viewed here