systeminformation

v5.23.5
Advanced, lightweight system and OS information library
system information sysinfo monitor monitoring os linux osx windows freebsd and 49 more...

systeminformation logo

systeminformation

System and OS information library for node.js
Explore Systeminformation docs »

Report bug · Request feature · Changelog

[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Git Issues][issues-img]][issues-url] [![Closed Issues][closed-issues-img]][closed-issues-url] no dependencies [![Sponsoring][sponsor-badge]][sponsor-url] [![Caretaker][caretaker-image]][caretaker-url] [![MIT license][license-img]][license-url]

The Systeminformation Project

This is amazing. Started as a small project just for myself, it now has > 15,000 lines of code, > 600 versions published, up to 8 mio downloads per month, > 300 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project!

Please support this project ... ☕️

Over the past few years I spent more than 2.000 hours working on this project and invested in hardware to be able to test on different platforms. Currently I am working very hard on the next new version 6.0 completely rewritten in TypeScript and with a lot of new features. Any support is highly appreciated - Buy me a coffee.

Your contribution make it possible for me to keep working on this project, add new features and support more platforms. Thank you in advance!

New Version 5.0

The new Version 5 is here - this next major version release 5.0 comes with new functionality and several improvements and changes (some of them are breaking changes!):

  • added audio: get detailed audio device information
  • added bluetooth: get detailed bluetooth device information
  • added dockerImages, dockerVolumes: get detailed information about docker images and volumes
  • added printer: get information from detected printers
  • added usb: get detailed usb controller and device information
  • added wifi interfaces and connections: extended wifi information
  • better uuid function to get unique hardware and OS UUIDs
  • better/extended cpu info detection
  • better/extended system info detection
  • Apple Silicon M1/M2/M3 support
  • better Raspberry-PI detection
  • systeminformation website updated and extended with full documentation and examples [systeminformation.io][systeminformation-url]
  • lot of minor improvements

Breaking Changes in version 5: you will see several breaking changes for the sake of a more consistent API interface and to be future proof. Read the [detailed version 5 changes][changes5-url].

I did a lot of testing on different platforms and machines but of course there might be some issues that I am not aware of. I would be happy if you inform me when you discover any issues. Issues can be [opened here][new-issue].

Quick Start

Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information.

  • simple to use
  • get detailed information about system, cpu, baseboard, battery, memory, disks/filesystem, network, docker, software, services and processes
  • supports Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support
  • no npm dependencies

Attention: this is a node.js library. It is supposed to be used as a backend/server-side library and will definitely not work within a browser.

Installation

npm install systeminformation --save

or simpler

npm i systeminformation

Give it a try with npx?

You just want to give it a try - right from your command line without installing it? Here is how you can call it with npx:

# get basic system info (System, OS, CPU)
npx systeminformation info

# obtain all static data - may take up to 30 seconds
npx systeminformation

Still need Version 4?

If you need version 4 (for compatibility reasons), you can install version 4 (latest release) like this

npm install systeminformation@4 —save

or simpler

npm install systeminformation@4

Usage

All functions (except version and time) are implemented as asynchronous functions. Here a small example how to use them:

const si = require('systeminformation');

// promises style - new since version 3
si.cpu()
  .then(data => console.log(data))
  .catch(error => console.error(error));

News and Changes

Latest Activity

(last 7 major and minor version releases)

  • Version 5.23.0: usb() added serial number (linux)
  • Version 5.22.0: wifiConnections() added signal quality
  • Version 5.21.0: graphics() added subVendor (linux)
  • Version 5.20.0: mem() added writeback and dirty (linux)
  • Version 5.19.0: currentLoad() added steal and guest time (linux)
  • Version 5.18.0: fsSize() added optional drive parameter
  • Version 5.17.0: graphics() added positionX, positionY (macOS)
  • Version 5.16.0: fsSize() added rw property
  • Version 5.15.0: blockDevices() added device
  • Version 5.14.0: blockDevices() added raid group member (linux)
  • Version 5.13.0: networkConnections() added process name (macOS)
  • Version 5.12.0: cpu() added performance and efficiency cores
  • Version 5.11.0: networkInterfaces() added default property and default parameter
  • Version 5.10.0: basic android support
  • Version 5.9.0: graphics() added properties (macOS)
  • Version 5.8.0: disksIO() added waitTime, waitPercent (linux)
  • Version 5.7.0: diskLayout() added S.M.A.R.T for Windows (if installed)
  • Version 5.6.0: cpuTemperature() added socket and chipset temp (linux)
  • Version 5.5.0: dockerVolumes() added
  • Version 5.4.0: dockerImages() added
  • Version 5.3.0: osInfo() added remoteSession (win only)
  • Version 5.2.0: wifiInterfaces() and wifiConnections() added
  • Version 5.1.0: memLayout() added ECC flag, bios() added language, features (linux)
  • Version 5.0.0: new version 5 - attention there are some breaking changes. See [detailed version 5 changes here][changes5-url].
  • ...

You can find all changes here: [detailed changelog][changelog-url]

Core concept

[Node.js][nodejs-url] comes with some basic OS information, but I always wanted a little more. So I came up to write this little library. This library is still a work in progress. It is supposed to be used as a backend/server-side library (it will definitely not work within a browser). It requires node.js version 4.0 and above.

I was able to test it on several Debian, Raspbian, Ubuntu distributions as well as macOS (Mavericks, Yosemite, El Captain, Sierra, High Sierra, Mojave, Catalina, Big Sur) and some Windows 7, Windows 8, Windows 10, FreeBSD, OpenBSD, NetBSD and SunOS machines. Not all functions are supported on all operating systems. Have a look at the function reference in the docs to get further details.

If you have comments, suggestions & reports, please feel free to contact me!

I also created a nice little command line tool called [mmon][mmon-github-url] (micro-monitor) for Linux and macOS, also available via [github][mmon-github-url] and [npm][mmon-npm-url]

Reference

Function Reference and OS Support

Full function reference with examples can be found at [https://systeminformation.io][systeminformation-url].

1. General

Function Result object Linux BSD Mac Win Sun Comments
si.version() : string X X X X X lib version (no callback/promise)
si.time() {...} X X X X X (no callback/promise)
current X X X X X local (server) time
uptime X X X X X uptime in number of seconds
timezone X X X X X e.g. GMT+0200
timezoneName X X X X X e.g. CEST

2. System (HW)

Function Result object Linux BSD Mac Win Sun Comments
si.system(cb) {...} X X X X hardware information
manufacturer X X X X e.g. 'MSI'
model X X X X model/product e.g. 'MS-7823'
version X X X X version e.g. '1.0'
serial X X X X serial number
uuid X X X X UUID
sku X X X X SKU number
virtual X X X is virtual machine
virtualHost X X X virtual host (if virtual)
raspberry X optional raspberry revision data
si.bios(cb) {...} X X X X bios information
vendor X X X X e.g. 'AMI'
version X X X X version
releaseDate X X X release date
revision X X X revision
serial X X serial
si.baseboard(cb) {...} X X X X baseboard information
manufacturer X X X X e.g. 'ASUS'
model X X X X model / product name
version X X X X version
serial X X X X serial number
assetTag X X X X asset tag
memMax X X X max memory in bytes
memSlots X X X memory slots on baseboard
si.chassis(cb) {...} X X X X chassis information
manufacturer X X X X e.g. 'MSI'
model X X X X model / product name
type X X X X model / product name
version X X X X version
serial X X X X serial number
assetTag X X X X asset tag
sku X SKU number

3. CPU

Function Result object Linux BSD Mac Win Sun Comments
si.cpu(cb) {...} X X X X CPU information
manufacturer X X X X e.g. 'Intel(R)'
brand X X X X e.g. 'Core(TM)2 Duo'
speed X X X X in GHz e.g. '3.40'
speedMin X X X in GHz e.g. '0.80'
speedMax X X X X in GHz e.g. '3.90'
governor X e.g. 'powersave'
cores X X X X # cores
physicalCores X X X X # physical cores
efficiencyCores X X # efficiency cores
performanceCores X X # performance cores
processors X X X X # processors
socket X X X socket type e.g. "LGA1356"
vendor X X X X vendor ID
family X X X X processor family
model X X X X processor model
stepping X X X X processor stepping
revision X X X revision
voltage X voltage
flags X X X X CPU flags
virtualization X X X X virtualization supported
cache X X X X cache in bytes (object)
cache.l1d X X X X L1D (data) size
cache.l1i X X X X L1I (instruction) size
cache.l2 X X X X L2 size
cache.l3 X X X X L3 size
si.cpuFlags(cb) : string X X X X CPU flags
si.cpuCache(cb) {...} X X X X CPU cache sizes
l1d X X X X L1D size
l1i X X X X L1I size
l2 X X X X L2 size
l3 X X X X L3 size
si.cpuCurrentSpeed(cb) {...} X X X X X current CPU speed (in GHz)
avg X X X X X avg CPU speed (all cores)
min X X X X X min CPU speed (all cores)
max X X X X X max CPU speed (all cores)
cores X X X X X CPU speed per core (array)
si.cpuTemperature(cb) {...} X X X* X CPU temperature in C (if supported)
main X X X X main temperature (avg)
cores X X X X array of temperatures
max X X X X max temperature
socket X array socket temperatures
chipset X chipset temperature

4. Memory

Function Result object Linux BSD Mac Win Sun Comments
si.mem(cb) {...} X X X X X Memory information (in bytes)
total X X X X X total memory in bytes
free X X X X X not used in bytes
used X X X X X used (incl. buffers/cache)
active X X X X X used actively (excl. buffers/cache)
buffcache X X X X used by buffers+cache
buffers X used by buffers
cached X used by cache
slab X used by slab
available X X X X X potentially available (total - active)
swaptotal X X X X X
swapused X X X X X
swapfree X X X X X
writeback X
dirty X
si.memLayout(cb) [{...}] X X X X Memory Layout (array)
[0].size X X X X size in bytes
[0].bank X X X memory bank
[0].type X X X X memory type
[0].clockSpeed X X X X clock speed
[0].formFactor X X X form factor
[0].manufacturer X X X X manufacturer
[0].partNum X X X X part number
[0].serialNum X X X X serial number
[0].voltageConfigured X X X voltage conf.
[0].voltageMin X X X voltage min
[0].voltageMax X X X voltage max

5. Battery

Function Result object Linux BSD Mac Win Sun Comments
si.battery(cb) {...} X X X X battery information
hasBattery X X X X indicates presence of battery
cycleCount X X numbers of recharges
isCharging X X X X indicates if battery is charging
designedCapacity X X X max capacity of battery (mWh)
maxCapacity X X X max capacity of battery (mWh)
currentCapacity X X X current capacity of battery (mWh)
capacityUnit X X X capacity unit (mWh)
voltage X X X current voltage of battery (V)
percent X X X X charging level in percent
timeRemaining X X minutes left (if discharging)
acConnected X X X X AC connected
type X X battery type
model X X model
manufacturer X X manufacturer
serial X X battery serial
  • See known issues if you have a problem with macOS temperature or windows temperature

6. Graphics

Function Result object Linux BSD Mac Win Sun Comments
si.graphics(cb) {...} X X X arrays of graphics controllers and displays
controllers[] X X X graphics controllers array
...[0].vendor X X X e.g. NVIDIA
...[0].subVendor X e.g. Gigabyte
...[0].vendorId X vendor ID
...[0].model X X X graphics controller model
...[0].deviceId X device ID
...[0].bus X X X on which bus (e.g. PCIe)
...[0].vram X X X VRAM size (in MB)
...[0].vramDynamic X X X true if dynamically allocated ram
...[0].external X is external GPU
...[0].cores X Apple silicon only
...[0].metalVersion X Apple Metal Version
displays[] X X X monitor/display array
...[0].vendor X monitor/display vendor
...[0].vendorId X vendor ID
...[0].deviceName X e.g. \\.\DISPLAY1
...[0].model X X X monitor/display model
...[0].productionYear X production year
...[0].serial X serial number
...[0].displayId X display ID
...[0].main X X X true if main monitor
...[0].builtin X X true if built-in monitor
...[0].connection X X X e.g. DisplayPort or HDMI
...[0].sizeX X X size in mm horizontal
...[0].sizeY X X size in mm vertical
...[0].pixelDepth X X X color depth in bits
...[0].resolutionX X X X pixel horizontal
...[0].resolutionY X X X pixel vertical
...[0].currentResX X X X current pixel horizontal
...[0].currentResY X X X current pixel vertical
...[0].positionX X X display position X
...[0].positionY X X display position Y
...[0].currentRefreshRate X X X current screen refresh rate

7. Operating System

Function Result object Linux BSD Mac Win Sun Comments
si.osInfo(cb) {...} X X X X X OS information
platform X X X X X 'linux', 'darwin', 'Windows', ...
distro X X X X X
release X X X X X
codename X X
kernel X X X X X kernel release - same as os.release()
arch X X X X X same as os.arch()
hostname X X X X X same as os.hostname()
fqdn X X X X X FQDN fully qualified domain name
codepage X X X X OS build version
logofile X X X X X e.g. 'apple', 'debian', 'fedora', ...
serial X X X X OS/Host serial number
build X X X OS build version
servicepack X service pack version
uefi X X X X OS started via UEFI
hypervisor X hyper-v enabled? (win only)
remoteSession X runs in remote session (win only)
si.uuid(cb) {...} X X X X X object of several UUIDs
os X X X X os specific UUID
hardware X X X X hardware specific UUID
macs X X X X MAC addresses
si.versions(apps, cb) {...} X X X X X version information (kernel, ssl, node, ...)
apps param is optional for detecting
only specific apps/libs
(string, comma separated)
si.shell(cb) : string X X X X standard shell
si.users(cb) [{...}] X X X X X array of users online
[0].user X X X X X user name
[0].tty X X X X X terminal
[0].date X X X X X login date
[0].time X X X X X login time
[0].ip X X X X ip address (remote login)
[0].command X X X X last command or shell

8. Current Load, Processes & Services

Function Result object Linux BSD Mac Win Sun Comments
si.currentLoad(cb) {...} X X X X CPU-Load
avgLoad X X X average load
currentLoad X X X X CPU load in %
currentLoadUser X X X X CPU load user in %
currentLoadSystem X X X X CPU load system in %
currentLoadNice X X X X CPU load nice in %
currentLoadIdle X X X X CPU load idle in %
currentLoadIrq X X X X CPU load system in %
rawCurrentLoad... X X X X CPU load raw values (ticks)
cpus[] X X X X current loads per CPU in % + raw ticks
si.fullLoad(cb) : integer X X X CPU full load since bootup in %
si.processes(cb) {...} X X X X X # running processes
all X X X X X # of all processes
running X X X X # of all processes running
blocked X X X X # of all processes blocked
sleeping X X X X # of all processes sleeping
unknown X # of all processes unknown status
list[] X X X X X list of all processes incl. details
...[0].pid X X X X X process PID
...[0].parentPid X X X X X parent process PID
...[0].name X X X X X process name
...[0].cpu X X X X X process % CPU usage
...[0].cpuu X X X process % CPU usage (user)
...[0].cpus X X X process % CPU usage (system)
...[0].mem X X X X X process memory %
...[0].priority X X X X X process priority
...[0].memVsz X X X X X process virtual memory size
...[0].memRss X X X X X process mem resident set size
...[0].nice X X X X process nice value
...[0].started X X X X X process start time
...[0].state X X X X X process state (e.g. sleeping)
...[0].tty X X X X tty from which process was started
...[0].user X X X X user who started process
...[0].command X X X X X process starting command
...[0].params X X X X process params
...[0].path X X X X X process path
proc X X X X process name
pid X X X X PID
pids X X X X additional pids
cpu X X X X process % CPU
mem X X X X process % MEM
si.services('mysql, apache2', cb) [{...}] X X X X pass comma separated string of services
pass "*" for ALL services (linux/win only)
[0].name X X X X name of service
[0].running X X X X true / false
[0].startmode X manual, automatic, ...
[0].pids X X X X pids
[0].cpu X X X process % CPU
[0].mem X X X process % MEM
si.processLoad('mysql, apache2', cb) [{...}] X X X X pass comma separated string of processes
pass "*" for ALL processes (linux/win only)
[0].proc X X X X name of process
[0].pids X X X X pids
[0].cpu X X X process % CPU
[0].mem X X X process % MEM

9. File System

Function Result object Linux BSD Mac Win Sun Comments
si.diskLayout(cb) [{...}] X X X physical disk layout (array)
[0].device X X e.g. /dev/sda
[0].type X X X HD, SSD, NVMe
[0].name X X X disk name
[0].vendor X X vendor/producer
[0].size X X X size in bytes
[0].bytesPerSector X bytes per sector
[0].totalCylinders X total cylinders
[0].totalHeads X total heads
[0].totalSectors X total sectors
[0].totalTracks X total tracks
[0].tracksPerCylinder X tracks per cylinder
[0].sectorsPerTrack X sectors per track
[0].firmwareRevision X X X firmware revision
[0].serialNum X X X serial number
[0].interfaceType X X X SATA, PCIe, ...
[0].smartStatus X X X S.M.A.R.T Status (see Known Issues)
[0].temperature X S.M.A.R.T temperature
[0].smartData X X full S.M.A.R.T data from smartctl
requires at least smartmontools 7.0
si.blockDevices(cb) [{...}] X X X returns array of disks, partitions,
raids and roms
[0].name X X X name
[0].type X X X type
[0].fstype X X X file system type (e.g. ext4)
[0].mount X X X mount point
[0].size X X X size in bytes
[0].physical X X X physical type (HDD, SSD, CD/DVD)
[0].uuid X X X UUID
[0].label X X X label
[0].model X X model
[0].serial X X serial
[0].removable X X X serial
[0].protocol X X protocol (SATA, PCI-Express, ...)
[0].group X Raid group member (e.g. md1)
[0].device X X X physical device mapped to (e.g. /dev/sda)
si.disksIO(cb) {...} X X current transfer stats
rIO X X read IOs on all mounted drives
wIO X X write IOs on all mounted drives
tIO X X write IOs on all mounted drives
rIO_sec X X read IO per sec (* see notes)
wIO_sec X X write IO per sec (* see notes)
tIO_sec X X total IO per sec (* see notes)
rWaitTime X read IO request time (* see notes)
wWaitTime X write IO request time (* see notes)
tWaitTime X total IO request time (* see notes)
rWaitPercent X read IO request time percent (* see notes)
wWaitPercent X write IO request time percent (* see notes)
tWaitPercent X total IO request time percent (* see notes)
ms X X interval length (for per second values)
si.fsSize(drive, cb) [{...}] X X X X returns array of mounted file systems
drive param is optional
[0].fs X X X X name of file system
[0].type X X X X type of file system
[0].size X X X X sizes in bytes
[0].used X X X X used in bytes
[0].available X X X X used in bytes
[0].use X X X X used in %
[0].mount X X X X mount point
[0].rw X X X X read and write (false if read only)
si.fsOpenFiles(cb) {...} X X X count max/allocated file descriptors
max X X X max file descriptors
allocated X X X current open files count
available X X X count available
si.fsStats(cb) {...} X X current transfer stats
rx X X bytes read since startup
wx X X bytes written since startup
tx X X total bytes read + written since startup
rx_sec X X bytes read / second (* see notes)
wx_sec X X bytes written / second (* see notes)
tx_sec X X total bytes reads + written / second
ms X X interval length (for per second values)

10. USB

Function Result object Linux BSD Mac Win Sun Comments
si.usb(cb) [{...}] X X X X get detected USB devices
[0].bus X USB bus
[0].deviceId X bus device id
[0].id X X X internal id
[0].name X X X name
[0].type X X X name
[0].removable X is removable
[0].vendor X X vendor
[0].manufacturer X X X manufacturer
[0].maxPower X max power
[0].default X X X is default printer
[0].serialNumber X X serial number

11. Printer

Function Result object Linux BSD Mac Win Sun Comments
si.printer(cb) [{...}] X X X X get printer information
[0].id X X X internal id
[0].name X X X name
[0].model X X X model
[0].uri X X printer URI
[0].uuid X printer UUID
[0].status X X X printer status (e.g. idle)
[0].local X X X is local printer
[0].default X X is default printer
[0].shared X X X is shared printer

12. Audio

Function Result object Linux BSD Mac Win Sun Comments
si.audio(cb) [{...}] X X X X get printer information
[0].id X X X internal id
[0].name X X X name
[0].manufacturer X X X manufacturer
[0].revision X revision
[0].driver X driver
[0].default X X is default
[0].channel X X channel e.g. USB, HDMI, ...
[0].type X X X type e.g. Speaker
[0].in X X is input channel
[0].out X X is output channel
[0].interfaceType X X X interface type (PCIe, USB, HDMI, ...)
[0].status X X X printer status (e.g. idle)

13. Network related functions

Function Result object Linux BSD Mac Win Sun Comments
si.networkInterfaces(cb) [{...}] X X X X X array of network interfaces
With the 'default' parameter it returns
only the default interface
[0].iface X X X X X interface
[0].ifaceName X X X X X interface name (differs on Windows)
[0].default X X X X X true if this is the default interface
[0].ip4 X X X X X ip4 address
[0].ip4subnet X X X X X ip4 subnet mask
[0].ip6 X X X X X ip6 address
[0].ip6subnet X X X X X ip6 subnet mask
[0].mac X X X X X MAC address
[0].internal X X X X X true if internal interface
[0].virtual X X X X X true if virtual interface
[0].operstate X X X up / down
[0].type X X X wireless / wired
[0].duplex X X duplex
[0].mtu X X maximum transmission unit
[0].speed X X X speed in MBit / s
[0].dhcp X X X IP address obtained by DHCP
[0].dnsSuffix X X DNS suffix
npm i systeminformation

Metadata

  • MIT
  • >=8.0.0
  • Sebastian Hildebrandt
  • released 8/21/2024

Downloads

Maintainers