This is amazing. Started as a small project just for myself, it now has > 17,000 lines of code, > 600 versions published, up to 6 mio downloads per month, > 150 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project!
New Version 6
Version 6 is a complete rewrite of the library in TypeScript, shipping typed
declarations (.d.ts) for every function while keeping the same zero-dependency
promise-based API. It is a node.js backend/server-side library and 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
fans() - detected fans with rpm and pwm
serialPorts() - detected serial / COM ports
Extended Windows support
disksIO(), fsStats(), fsOpenFiles() and thunderbolt() are now also
available on Windows (none of them was available there in version 5).
Modular imports
The whole library, a single operating system, or a single function can now be
imported individually - see Installation and Usage.
Breaking changes
time() and version() are now asynchronous and return a promise (both
were synchronous in version 5). Since version 6 all functions are async.
The preferred way to consume them is async / await, alternatively promises.
Callbacks are no longer available. The former callback style
(si.cpu(data => ...)) has been removed - use async / await or promises.
Minimum Node.js version is now 20.0 (older releases are no longer supported).
Import paths. With the new exports map only the documented entry points are
importable (deep dist/... paths are no longer part of the public API).
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 install systeminformation
Still need Version 5?
If you need version 4 (for compatibility reasons), you can install version 4 (latest release) like this
npm install systeminformation@5 —save
or simpler
npm install systeminformation@5
Usage
All functions are asynchronous (since version 6 this includes version() and
time()). The preferred way to consume them is async / await; every
function also returns a promise as an alternative. Callbacks are no longer
supported.
Import the whole library, a single OS, or a single function
Since version 6 the package exposes an exports map so you only load what you
need. All variants work with both require and import.
// 1) whole library (all functions, all platforms)const si = require("systeminformation");await si.cpu();// 2) a single function (platform is still detected at runtime)const { cpu } = require("systeminformation/cpu");await cpu();// 3) a whole operating system (only that platform's implementations)const linux = require("systeminformation/linux"); // or /darwin, /windows, /bsd, /sunawait linux.cpu();// 4) a single function of a single operating systemconst { cpu } = require("systeminformation/linux/cpu");await cpu();
Variants 2-4 keep bundles small: only the imported function (and, for the plain
function import, only the platform actually running) is pulled in, so unused OS
implementations can be tree-shaken away.
News and Changes
Latest Activity
Version 6.0.0
complete rewrite in TypeScript with typed declarations for every function
modular imports: load the whole library, a single operating system, or a single function
Node.js 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 20.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, Monterey, Ventura, Sonoma, Sequoia, Tahoe) and some Windows 7,
Windows 8, Windows 10, Windows 11, 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 (micro-monitor) for Linux and macOS, also available via github and npm
optional Apple iBridge / security chip data (modelName, build, bootUuid, secureBoot)
si.baseboard()
{...}
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()
{...}
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 / NPU
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.cpu()
{...}
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()
: string
X
X
X
X
CPU flags
si.cpuCache()
{...}
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()
{...}
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()
{...}
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
si.fans()
[{...}]
X
X*
X*
detected fans
[0].id
X
X*
X*
identifier, e.g. hwmon2/fan1
[0].label
X
X*
X*
label if the driver provides one
[0].rpm
X
X*
X*
speed in rpm (or null)
[0].pwm
X
X*
X*
duty cycle in % (or null)
[0].source
X
X*
X*
chip / provider the value came from
si.npu()
[{...}]
X
X
X
detected NPUs / AI accelerators
[0].vendor
X
X
X
vendor (Intel, AMD, Apple, ...)
[0].name
X
X
X
name
[0].model
X
model (SoC on Apple Silicon)
[0].cores
X
number of NPU cores (or null)
[0].vendorId
X
X
vendor id (hex)
[0].deviceId
X
X
device id (hex)
[0].driver
X
X
kernel driver / service
4. Memory
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.mem()
{...}
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 and ZFS ARC)
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), incl. reclaimable ZFS ARC
swaptotal
X
X
X
X
X
swapused
X
X
X
X
X
swapfree
X
X
X
X
X
si.memLayout()
[{...}]
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()
{...}
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
In v6 the former graphics() function was split into si.gpu() (graphics controllers) and si.displays() (monitors/displays). Both return plain arrays. si.get() returns a migration hint for the removed graphics key.
On Windows, si.displays() reports physical monitors: in duplicate/mirror mode each mirrored monitor gets its own entry (sharing the resolution and position of the mirrored screen).
On Linux, si.gpu() also covers the integrated GPU of NVIDIA Tegra / Jetson boards. It is a device tree platform device rather than a PCI one, so model, utilizationGpu, temperatureGpu and clockCore are read from the Tegra sysfs nodes - neither tegrastats nor jtop is required. Its memory is shared with the system, so vram is null and vramDynamic is true.
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.gpu()
[{...}]
X
X
X
array of graphics controllers
[0].vendor
X
X
X
e.g. ATI
[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].busAddress
X
X
PCI bus address, e.g. '01:00.0'
[0].vram
X
X
X
VRAM size (in MB), null if shared
[0].vramDynamic
X
X
X
true if dynamically allocated ram (integrated GPUs)
[0].external
X
is external GPU
[0].cores
X
Apple silicon only
[0].metalVersion
X
Apple Metal Version
[0].temperatureGpu
X
X
X
GPU temperature (see notes below)
si.displays()
[{...}]
X
X
X
array of monitors/displays
[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
X
production year
[0].serial
X
X
serial number
[0].displayId
X
X
display ID
[0].main
X
X
X
true if main monitor
[0].mirror
X
X
X
true if mirrored / duplicated
[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
X
display position X
[0].positionY
X
X
X
display position Y
[0].workAreaResolutionX
X
X
X
working area (screen minus task bar / panels / menu bar and Dock) resolution X
[0].workAreaResolutionY
X
X
X
working area resolution Y
[0].workAreaPositionX
X
X
X
working area position X
[0].workAreaPositionY
X
X
X
working area position Y
[0].currentRefreshRate
X
X
X
current screen refresh rate
[0].scale
X
DPI scaling factor, e.g. 1.5
[0].powerState
X
X
'on', 'standby', 'suspend', 'off'
[0].gpu
X
X
GPU model driving this display
[0].gpuBusAddress
X
X
PCI addr, joins gpu().busAddress
7. Operating System
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.osInfo()
{...}
X
X
X
X
X
OS information
platform
X
X
X
X
X
'linux', 'darwin', 'win32', ...
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)
installDate
X
X
X
OS installation date (Date object or null)
displayServer
X
X
X
X
X
display server e.g. wayland, x11, quartz, dwm, surfaceflinger or '' (headless)
security
X
X
mandatory access control / system integrity (module, enabled, mode, policy)
si.uuid()
{...}
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)
{...}
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()
: string
X
X
X
X
standard shell
si.users()
[{...}]
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
si.software()
[{...}]
X
X
X
installed software / applications
[0].name
X
X
X
name
[0].description
X
X
description
[0].version
X
X
X
version
[0].installDate
X
X
X
install date (or null)
[0].architecture
X
X
X
architecture
[0].source
X
X
X
source / obtained from
[0].path
X
X
X
install path
[0].signedBy
X
X
signing authorities (array)
si.npm()
[{...}]
X
X
X
X
X
globally installed npm packages
[0].name
X
X
X
X
X
package name
[0].version
X
X
X
X
X
package version
8. Current Load, Processes & Services
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.currentLoad()
{...}
X
X
X
X
CPU-Load
avgLoad
X
X
X
X
average load (Windows: approximated, see docs)
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 %
currentLoadIowait
X
CPU load waiting for IO in % (Linux only, 0 elsewhere)
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()
: integer
X
X
X
CPU full load since bootup in %
si.processes()
{...}
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].cpuTime
X
X
X
X
X
process cpu time in seconds (own, without reaped children); null if not available
...[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')
[{...}]
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')
[{...}]
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
si.processFocused()
{...}
X
X
X
process owning the currently focused window (X11 only on Linux); null if not detectable
pid
X
X
X
PID of the focused process
name
X
X
X
name of the focused process
path
X
X
X
path of the focused process
9. File System
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.diskLayout()
[{...}]
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
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()
[{...}]
X
X
X
returns array of disks, partitions, raids, pools 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 / pool member (e.g. md1, ZFS pool, btrfs label)
[0].device
X
X
X
physical device mapped to (e.g. /dev/sda)
si.disksIO()
{...}
X
X
X
current transfer stats
rIO
X
X
X
read IOs on all mounted drives
wIO
X
X
X
write IOs on all mounted drives
tIO
X
X
X
write IOs on all mounted drives
rIO_sec
X
X
X
read IO operations per sec, not bytes (* see notes)
wIO_sec
X
X
X
write IO operations per sec, not bytes (* see notes)
tIO_sec
X
X
X
total IO operations per sec, not bytes (* see notes)
rWaitTime
X
read IO request time in ms during interval, null on 1st call (* notes)
wWaitTime
X
write IO request time in ms during interval, null on 1st call (* notes)
tWaitTime
X
total IO request time in ms during interval, null on 1st call (* 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
X
interval length (for per second values)
si.fsSize(drive)
[{...}]
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()
{...}
X
X
X
X
count max/allocated file descriptors
max
X
X
X
max file descriptors
allocated
X
X
X
X
current open files count (win: system-wide handle count)
available
X
X
X
count available
si.fsStats()
{...}
X
X
X
current transfer stats
rx
X
X
X
bytes read since startup
wx
X
X
X
bytes written since startup
tx
X
X
X
total bytes read + written since startup
rx_sec
X
X
X
bytes read / second (* see notes)
wx_sec
X
X
X
bytes written / second (* see notes)
tx_sec
X
X
X
total bytes reads + written / second
ms
X
X
X
interval length (for per second values)
10. Interfaces
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.pci()
[{...}]
X
X
X
PCI devices (experimental)
[0].slot
X
X
bus address / slot
[0].bus
X
X
PCI bus
[0].type
X
X
X
device class / category
[0].vendor
X
X
vendor name
[0].vendorId
X
X
X
vendor id (hex)
[0].model
X
X
X
device / product name
[0].deviceId
X
X
X
device id (hex)
[0].subVendorId
X
X
X
subsystem vendor id (hex)
[0].subDeviceId
X
X
X
subsystem device id (hex)
[0].revision
X
X
X
revision
[0].driver
X
X
kernel driver / service
si.thunderbolt()
[{...}]
X
X
X
Thunderbolt controllers/devices
[0].name
X
X
X
name
[0].uuid
X
X
device UUID
[0].bus
X
X
bus number
[0].type
X
X
X
type (e.g. hub)
[0].speed
X
X
speed
si.usb()
[{...}]
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
type
[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
serial number
si.serialPorts()
[{...}]
X
X
X
detected serial / COM ports
[0].device
X
X
X
device path (COMx on Windows)
[0].name
X
X
X
product / friendly name
[0].manufacturer
X
X
X
manufacturer
[0].serialNumber
X
X
X
serial number (USB only)
[0].vendorId
X
X
X
vendor id (hex)
[0].productId
X
X
X
product id (hex)
[0].pnpId
X
X
stable id (by-id / DeviceID)
[0].type
X
X
X
usb, onboard, pci, bluetooth
11. Devices
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.camera()
[{...}]
X
X
X
detected cameras
[0].name
X
X
X
name
[0].model
X
X
X
model
[0].vendor
X
X
X
vendor
[0].serial
X
X
X
serial number
[0].connection
X
X
X
connection (e.g. built-in, USB)
si.keyboard()
[{...}]
X
X
X
detected keyboards
[0].name
X
X
X
name
[0].model
X
X
X
model
[0].vendor
X
X
X
vendor
[0].serial
X
X
X
serial number
[0].connection
X
X
X
connection
si.mouse()
[{...}]
X
X
X
detected pointing devices
[0].name
X
X
X
name
[0].type
X
X
X
type
[0].model
X
X
X
model
[0].vendor
X
X
X
vendor
[0].serial
X
X
X
serial number
[0].connection
X
X
X
connection
si.printer()
[{...}]
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
si.audio()
[{...}]
X
X
X
X
get audio device 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
X
channel e.g. USB, HDMI, ...
[0].type
X
X
X
type e.g. Speaker
[0].in
X
X
X
is input channel
[0].out
X
X
X
is output channel
[0].status
X
X
X
status (e.g. active)
12. Network related functions
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.networkInterfaces()
[{...}]
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].vendor
X
X
X
network adapter vendor (not available for every adapter)
[0].model
X
X
X
network adapter model (not available for every adapter)
[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].gateway
X
X
X
X
default gateway of this interface
[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
[0].ieee8021xAuth
X
X
IEEE 802.1x auth
[0].ieee8021xState
X
X
IEEE 802.1x state
[0].carrierChanges
X
# changes up/down
si.networkInterfaceDefault()
: string
X
X
X
X
X
get name of default network interface
si.networkGatewayDefault()
: string
X
X
X
X
X
get default network gateway
si.networkStats(ifaces)
[{...}]
X
X
X
X
current network stats of given interfaces iface list: space or comma separated iface parameter is optional defaults to first external network interface, Pass '*' for all interfaces
[0].iface
X
X
X
X
interface
[0].operstate
X
X
X
X
up / down
[0].rx_bytes
X
X
X
X
received bytes overall
[0].rx_packets
X
X
X
X
received packets overall
[0].rx_dropped
X
X
X
X
received dropped overall
[0].rx_errors
X
X
X
X
received errors overall
[0].tx_bytes
X
X
X
X
transferred bytes overall
[0].tx_packets
X
X
X
X
transferred packets overall
[0].tx_dropped
X
X
X
X
transferred dropped overall
[0].tx_errors
X
X
X
X
transferred errors overall
[0].rx_sec
X
X
X
X
received bytes / second (* see notes)
[0].tx_sec
X
X
X
X
transferred bytes per second (* see notes)
[0].ms
X
X
X
X
interval length (for per second values)
si.networkConnections()
[{...}]
X
X
X
X
current network network connections returns an array of all connections
[0].protocol
X
X
X
X
tcp or udp
[0].localAddress
X
X
X
X
local address
[0].localPort
X
X
X
X
local port
[0].peerAddress
X
X
X
X
peer address
[0].peerPort
X
X
X
X
peer port
[0].state
X
X
X
X
like ESTABLISHED, TIME_WAIT, ...
[0].pid
X
X
X
X
process ID
[0].process
X
X
X
process name
si.inetChecksite(url)
{...}
X
X
X
X
X
response-time (ms) to fetch given URL
url
X
X
X
X
X
given url
ok
X
X
X
X
X
status code OK (2xx, 3xx)
status
X
X
X
X
X
status code
ms
X
X
X
X
X
response time in ms
si.inetLatency(host)
: number
X
X
X
X
X
response-time (ms) to external resource host parameter is optional (default 8.8.8.8)
13. Wifi
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.wifiNetworks()
[{...}]
X
X
X
array of available wifi networks
[0].ssid
X
X
X
Wifi network SSID
[0].bssid
X
X
X
BSSID (mac)
[0].mode
X
mode
[0].channel
X
X
X
channel
[0].frequency
X
X
X
frequency in MHz
[0].signalLevel
X
X
X
signal level in dB
[0].quality
X
X
X
quality in %
[0].security
X
X
X
array e.g. WPA, WPA-2
[0].wpaFlags
X
X
X
array of WPA flags
[0].rsnFlags
X
array of RDN flags
si.wifiInterfaces()
[{...}]
X
X
X
array of detected wifi interfaces
[0].id
X
X
X
ID
[0].iface
X
X
X
interface
[0].model
X
X
X
model
[0].vendor
X
X
X
vendor
[0].mac
X
X
X
MAC address
si.wifiConnections()
[{...}]
X
X
X
array of active wifi connections
[0].id
X
X
X
ID
[0].iface
X
X
X
interface
[0].name
X
X
X
name
[0].mode
X
X
X
model
[0].bssid
X
X
X
BSSID (mac)
[0].mode
X
mode
[0].channel
X
X
X
channel
[0].frequency
X
X
X
frequency in MHz
[0].signalLevel
X
X
X
signal level in dB
[0].quality
X
X
X
quality in %
[0].security
X
X
X
array e.g. WPA, WPA-2
[0].txRate
X
X
X
transfer rate MBit/s
14. Bluetooth
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.bluetoothDevices()
[{...}]
X
X
X
...
[0].device
X
device name
[0].name
X
X
X
name
[0].macDevice
X
X
MAC address device
[0].macHost
X
X
MAC address host
[0].batteryPercent
X
battery level percent
[0].manufacturer
X
X
manufacturer
[0].type
X
X
X
type of bluetooth device
[0].connected
X
X
is connected
15. Docker
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.dockerInfo()
{...}
X
X
X
X
X
returns general docker info
id
X
X
X
X
X
Docker ID
containers
X
X
X
X
X
number of containers
containersRunning
X
X
X
X
X
number of running containers
containersPaused
X
X
X
X
X
number of paused containers
containersStopped
X
X
X
X
X
number of stopped containers
images
X
X
X
X
X
number of images
driver
X
X
X
X
X
driver (e.g. 'devicemapper', 'overlay2')
memoryLimit
X
X
X
X
X
has memory limit
swapLimit
X
X
X
X
X
has swap limit
kernelMemory
X
X
X
X
X
has kernel memory
cpuCfsPeriod
X
X
X
X
X
has CpuCfsPeriod
cpuCfsQuota
X
X
X
X
X
has CpuCfsQuota
cpuShares
X
X
X
X
X
has CPUShares
cpuSet
X
X
X
X
X
has CPUShares
ipv4Forwarding
X
X
X
X
X
has IPv4Forwarding
bridgeNfIptables
X
X
X
X
X
has BridgeNfIptables
bridgeNfIp6tables
X
X
X
X
X
has BridgeNfIp6tables
debug
X
X
X
X
X
Debug on
nfd
X
X
X
X
X
named data networking forwarding daemon
oomKillDisable
X
X
X
X
X
out-of-memory kill disabled
ngoroutines
X
X
X
X
X
number NGoroutines
systemTime
X
X
X
X
X
docker SystemTime
loggingDriver
X
X
X
X
X
logging driver e.g. 'json-file'
cgroupDriver
X
X
X
X
X
cgroup driver e.g. 'cgroupfs'
nEventsListener
X
X
X
X
X
number NEventsListeners
kernelVersion
X
X
X
X
X
docker kernel version
operatingSystem
X
X
X
X
X
docker OS e.g. 'Docker for Mac'
osType
X
X
X
X
X
OSType e.g. 'linux'
architecture
X
X
X
X
X
architecture e.g. x86_64
ncpu
X
X
X
X
X
number of CPUs
memTotal
X
X
X
X
X
memory total
dockerRootDir
X
X
X
X
X
docker root directory
httpProxy
X
X
X
X
X
http proxy
httpsProxy
X
X
X
X
X
https proxy
noProxy
X
X
X
X
X
NoProxy
name
X
X
X
X
X
Name
labels
X
X
X
X
X
array of labels
experimentalBuild
X
X
X
X
X
is experimental build
serverVersion
X
X
X
X
X
server version
clusterStore
X
X
X
X
X
cluster store
clusterAdvertise
X
X
X
X
X
cluster advertise
defaultRuntime
X
X
X
X
X
default runtime e.g. 'runc'
liveRestoreEnabled
X
X
X
X
X
live store enabled
isolation
X
X
X
X
X
isolation
initBinary
X
X
X
X
X
init binary
productLicense
X
X
X
X
X
product license
si.dockerImages(all)
[{...}]
X
X
X
X
X
returns array of top level/all docker images
[0].id
X
X
X
X
X
image ID
[0].container
X
X
X
X
X
container ID
[0].comment
X
X
X
X
X
comment
[0].os
X
X
X
X
X
OS
[0].architecture
X
X
X
X
X
architecture
[0].parent
X
X
X
X
X
parent ID
[0].dockerVersion
X
X
X
X
X
docker version
[0].size
X
X
X
X
X
image size
[0].sharedSize
X
X
X
X
X
shared size
[0].virtualSize
X
X
X
X
X
virtual size
[0].author
X
X
X
X
X
author
[0].created
X
X
X
X
X
created date / time
[0].containerConfig
X
X
X
X
X
container config object
[0].graphDriver
X
X
X
X
X
graph driver object
[0].repoDigests
X
X
X
X
X
repo digests array
[0].repoTags
X
X
X
X
X
repo tags array
[0].config
X
X
X
X
X
config object
[0].rootFS
X
X
X
X
X
root fs object
si.dockerContainers(all)
[{...}]
X
X
X
X
X
returns array of active/all docker containers
[0].id
X
X
X
X
X
ID of container
[0].name
X
X
X
X
X
name of container
[0].image
X
X
X
X
X
name of image
[0].imageID
X
X
X
X
X
ID of image
[0].command
X
X
X
X
X
command
[0].created
X
X
X
X
X
creation time (unix)
[0].started
X
X
X
X
X
creation time (unix)
[0].finished
X
X
X
X
X
creation time (unix)
[0].createdAt
X
X
X
X
X
creation date time string
[0].startedAt
X
X
X
X
X
creation date time string
[0].finishedAt
X
X
X
X
X
creation date time string
[0].status
X
X
X
X
X
healthy, starting, unhealthy
[0].state
X
X
X
X
X
created, running, exited
[0].labels
X
X
X
X
X
object of labels (key-value pairs)
[0].ports
X
X
X
X
X
array of ports
[0].mounts
X
X
X
X
X
array of mounts
si.dockerContainerStats(ids)
[{...}]
X
X
X
X
X
statistics for specific containers container IDs: space or comma separated, pass '*' for all containers
[0].id
X
X
X
X
X
Container ID
[0].memUsage
X
X
X
X
X
memory usage in bytes
[0].memLimit
X
X
X
X
X
memory limit (max mem) in bytes
[0].memPercent
X
X
X
X
X
memory usage in percent
[0].cpuPercent
X
X
X
X
X
cpu usage in percent
[0].pids
X
X
X
X
X
number of processes
[0].netIO.rx
X
X
X
X
X
received bytes via network
[0].netIO.wx
X
X
X
X
X
sent bytes via network
[0].blockIO.r
X
X
X
X
X
bytes read from BlockIO
[0].blockIO.w
X
X
X
X
X
bytes written to BlockIO
[0].cpuStats
X
X
X
X
X
detailed cpu stats
[0].percpuStats
X
X
X
X
X
detailed per cpu stats
[0].memoryStats
X
X
X
X
X
detailed memory stats
[0].networks
X
X
X
X
X
detailed network stats per interface
si.dockerContainerProcesses(id)
[{...}]
X
X
X
X
X
array of processes inside a container
[0].pidHost
X
X
X
X
X
process ID (host)
[0].ppid
X
X
X
X
X
parent process ID
[0].pgid
X
X
X
X
X
process group ID
[0].user
X
X
X
X
X
effective user name
[0].ruser
X
X
X
X
X
real user name
[0].group
X
X
X
X
X
effective group name
[0].rgroup
X
X
X
X
X
real group name
[0].stat
X
X
X
X
X
process state
[0].time
X
X
X
X
X
accumulated CPU time
[0].elapsed
X
X
X
X
X
elapsed running time
[0].nice
X
X
X
X
X
nice value
[0].rss
X
X
X
X
X
resident set size
[0].vsz
X
X
X
X
X
virtual size in Kbytes
[0].command
X
X
X
X
X
command and arguments
si.dockerVolumes()
[{...}]
returns array of all docker volumes
[0].name
X
X
X
X
X
volume name
[0].driver
X
X
X
X
X
driver
[0].labels
X
X
X
X
X
labels object
[0].mountpoint
X
X
X
X
X
mountpoint
[0].options
X
X
X
X
X
options
[0].scope
X
X
X
X
X
scope
[0].created
X
X
X
X
X
created at
si.dockerAll()
{...}
X
X
X
X
X
list of all containers including their stats and processes in one single array
16. Virtual Box
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.vboxInfo()
[{...}]
X
X
X
X
X
returns array general virtual box info
[0].id
X
X
X
X
X
virtual box ID
[0].name
X
X
X
X
X
name
[0].running
X
X
X
X
X
vbox is running
[0].started
X
X
X
X
X
started date time
[0].runningSince
X
X
X
X
X
running since (secs)
[0].stopped
X
X
X
X
X
stopped date time
[0].stoppedSince
X
X
X
X
X
stopped since (secs)
[0].guestOS
X
X
X
X
X
Guest OS
[0].hardwareUUID
X
X
X
X
X
Hardware UUID
[0].memory
X
X
X
X
X
Memory in MB
[0].vram
X
X
X
X
X
VRAM in MB
[0].cpus
X
X
X
X
X
CPUs
[0].cpuExepCap
X
X
X
X
X
CPU exec cap
[0].cpuProfile
X
X
X
X
X
CPU profile
[0].chipset
X
X
X
X
X
chipset
[0].firmware
X
X
X
X
X
firmware
[0].pageFusion
X
X
X
X
X
page fusion
[0].configFile
X
X
X
X
X
config file
[0].snapshotFolder
X
X
X
X
X
snapshot folder
[0].logFolder
X
X
X
X
X
log folder path
[0].hpet
X
X
X
X
X
HPET
[0].pae
X
X
X
X
X
PAE
[0].longMode
X
X
X
X
X
long mode
[0].tripleFaultReset
X
X
X
X
X
triple fault reset
[0].apic
X
X
X
X
X
APIC
[0].x2Apic
X
X
X
X
X
X2APIC
[0].acpi
X
X
X
X
X
ACPI
[0].ioApic
X
X
X
X
X
IOAPIC
[0].biosApicMode
X
X
X
X
X
BIOS APIC mode
[0].bootMenuMode
X
X
X
X
X
boot menu Mode
[0].bootDevice1
X
X
X
X
X
bootDevice1
[0].bootDevice2
X
X
X
X
X
bootDevice2
[0].bootDevice3
X
X
X
X
X
bootDevice3
[0].bootDevice4
X
X
X
X
X
bootDevice4
[0].timeOffset
X
X
X
X
X
time Offset
[0].rtc
X
X
X
X
X
RTC
17. "Get All / Observe" - functions
Function
Result object
Linux
BSD
Mac
Win
Sun
Comments
si.getStaticData()
{...}
X
X
X
X
X
all static data at once
si.getDynamicData(srv,iface)
{...}
X
X
X
X
X
all dynamic data at once Specify services and interfaces to monitor Defaults to first external network interface Pass "" for ALL services (linux/win only) Pass "" for ALL network interfaces
si.getAllData(srv,iface)
{...}
X
X
X
X
X
all data at once Specify services and interfaces to monitor Defaults to first external network interface Pass "" for ALL services (linux/win only) Pass "" for ALL network interfaces
si.get(valueObject)
{...}
X
X
X
X
X
get partial system info data at once In valueObject you can define all values, you want to get back (see documentation for details)
si.observe(valueObject,interval)
-
X
X
X
X
X
Observe a defined value object call callback on changes polling interval in milliseconds
All functions are asynchronous. The preferred way to consume them is
async / await; every function also returns a promise as an alternative.
Callbacks are no longer supported.
To be able to measure temperature on macOS I created two little additional packages. Due to some difficulties
in NPM with optionalDependencies I unfortunately was getting unexpected warnings on other platforms.
So I decided to drop this optional dependency for macOS - so by default, you will not get correct values.
But if you need to detect macOS temperature just run the following additional
installation command:
For Intel based machines (deprecated lib) install
$ npm install osx-temperature-sensor --save
For Apple Silicon (ARM) based machines install
$ npm install macos-temperature-sensor --save
systeminformation will then detect this additional library and return the temperature when calling systeminformations standard function cpuTemperature().
On Apple Silicon machines macos-temperature-sensor also enables the GPU temperature (temperatureGpu) in gpu()
and - as soon as the package exposes them - the fan speeds in fans().
Windows - Fan Speed
Windows itself does not expose actual fan speeds: Win32_Fan only reports that a fan exists, its DesiredSpeed is the requested speed and is left empty by virtually every mainboard. Real values are read from a running LibreHardwareMonitor or OpenHardwareMonitor, which publish their sensors in an own WMI namespace. Without one of these tools running, fans() returns an empty array or entries without rpm.
Serial Ports
serialPorts() only enumerates ports - opening one (baud rate, termios, RTS toggling) needs a native binding and is out of scope for this zero-dependency library. Two things worth knowing: on Linux a port shows up in the list even when your user is not in the dialout / uucp group, so listing can succeed while opening fails; on Windows the COMx number is reassigned per USB port, so pnpId is the only stable key. RS-232 and RS-485 cannot be told apart by enumeration - an RS-485 transceiver looks like an ordinary UART to the operating system - so no such information is reported.
Windows Temperature, Battery, ...
get-WmiObject - which is used to determine temperature and battery sometimes needs to be run with admin
privileges. So if you do not get any values, try to run it again with according
privileges. If you still do not get any values, your system might not support this feature.
In some cases we also discovered that get-WmiObject returned incorrect temperature values.
Linux Temperature
In some cases you need to install the Linux sensors package to be able to measure temperature
e.g. on DEBIAN based systems by running sudo apt-get install lm-sensors
Linux S.M.A.R.T. Status
To be able to detect S.M.A.R.T. status on Linux you need to install smartmontools. On DEBIAN based Linux distributions you can install it by running sudo apt-get install smartmontools
Windows Encoding Issues
I now reimplemented all windows functions to avoid encoding problems (special chacarters). And as Windows 11 now dropped wmic support, I had to move completely to powershell. Be sure that powershell version 5+ is installed on your machine. On older Windows versions (7, 8) you might still see encoding problems due to the old powershell version.
*: Additional Notes
In fsStats(), disksIO() and networkStats() the results / sec. values (rx_sec, IOPS, ...) are calculated correctly beginning
with the second call of the function. It is determined by calculating the difference of transferred bytes / IOs
divided by the time between two calls of the function.
The first time you are calling one of these functions, you will get null for transfer rates. The second time, you should then get statistics based on the time between the two calls ...
So basically, if you e.g. need a value for network stats every second, your code should look like this:
Linux is a registered trademark of Linus Torvalds. Apple, macOS, OS X are registered trademarks of Apple Inc.,
Windows is a registered trademark of Microsoft Corporation. Node.js is a trademark of Joyent Inc.,
Intel is a trademark of Intel Corporation, AMD is a trademark of Advanced Micro Devices Inc.,
Raspberry Pi is a trademark of the Raspberry Pi Foundation, Debian is a trademark owned by Software in the Public Interest, Inc.,
Ubuntu is a trademark of Canonical Ltd., FreeBSD is a registered trademark of The FreeBSD Foundation,
NetBSD is a registered trademark of The NetBSD Foundation, Docker is a trademark of Docker, Inc., Sun,
Solaris, OpenSolaris and registered trademarks of Sun Microsystems, VMware is a trademark of VMware Inc,
Virtual Box is a trademark of Oracle Corporation, Xen is a registered trademark of Xen Project,
QEMU is a trademark of Fabrice Bellard, bochs is a trademark of The Bochs Project, USB and USB Logo
are trademarks of USB Implementation Forum, Bluetooth and Bluetooth Logo are trademarks of Bluetooth SIG,
Android is a trademark of Google LLC, Parallels is a trademarks of Parallels International GmbH.
All other trademarks are the property of their respective owners.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.