Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@hoobs/systeminfo

hoobs-org20MIT4.14.7TypeScript support: included

Simple system and OS information library

system information, sysinfo, monitor, monitoring, os, linux, osx, windows, freebsd, openbsd, netbsd, cpu, cpuload, physical cores, logical cores, processor, cores, threads, socket type, memory, file system, fsstats, diskio, block devices, netstats, network, network interfaces, network connections, network stats, iface, processes, users, internet, battery, docker, docker stats, docker processes, graphics, graphic card, graphic controller, gpu, display, smart, disk layout, wifi, wifinetworks, virtual box, virtualbox, vm

readme

systeminformation logo

systeminformation

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

Report bug · Request feature · Changelog

NPM Version NPM Downloads Git Issues Closed Issues deps status Code Quality: Javascript Total alerts Caretaker MIT license

2019-03-12 - 5th birthday of systeminformation. This is amazing. Started as a small projekt just for myself, it now has > 8,000 lines of code, > 200 versions published, up to 100,000 downloads per month, > 1 Mio downloads overall. Thank you to all who contributed to this project!

New Version 4.0

This next major version release 4.0 comes with several optimizations and changes:

  • new systeminformation website with better documentation and examples systeminformation.io
  • added typescript definitions
  • reworked network section: this will now return more information and allows to get networkStats for more than one interface at once.
  • dockerContainerStats for multiple containers or all containers at once
  • optimized graphics controller and display detection
  • added wifiNetworks to get available wifi networks
  • added vboxInfo to get detailed vm information
  • added chassis information
  • better Raspberry-PI detection
  • lot of minor improvements

Breaking Changes: you will see some minor breaking changes. Read the detailed changelog.

Quick Start

Lightweight collection of 40+ 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 and SunOS support
  • no npm dependencies (for production)

Installation

$ npm install systeminformation --save

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));

Callback, Promises, Awync Await

News and Changes

Latest Activity

(last 7 major and minor version releases)

  • Version 4.14.0: processes() added process path and params
  • Version 4.13.0: networkConnections() added PID, process
  • Version 4.12.0: networkInterfaces() added property virtual
  • Version 4.11.0: wifiNetworks() added available wifi networks
  • Version 4.10.0: graphics() added windows multiple display support, added display size, connection, ...
  • Version 4.9.0: graphics() added vendor, refresh rate, current resolution
  • Version 4.8.0: added vboxInfo() detailed virtual box info
  • ...

You can find all changes here: detailed changelog

Core concept

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 work in progress. It is supposed to be used as a backend/server-side library (will definilely 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) and some Windows 7, 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 (micro-monitor) for Linux and macOS, also available via github and npm

Reference

Function Reference and OS Support

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
| 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
si.bios(cb) {...} X X X X | bios information
| vendor X X X X | e.g. 'AMI'
| version X X | X | version
| releaseDate X X | X | release date
| revision X X | X | revision
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
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'
| cores X X X X | # cores
| physicalCores X X X X | # physical 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
| 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 (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

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
| 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
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
| maxcapacity X | X X | max capacity of battery
| currentcapacity X | X X | current capacity of battery
| 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 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].model X | X X | graphics controller model
| ...[0].vendor X | X X | e.g. ATI
| ...[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 dynamicly allocated ram
| displays[] X | X X | monitor/display array
| ...[0].vendor | | X | monitor/display vendor
| ...[0].model X | X X | monitor/display model
| ...[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 X | size in mm horizontal
| ...[0].sizey X | 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 | display position X
| ...[0].positionY | | X | display position Y
| ...[0].currentRefreshRate X | X X | current pixel vertical

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 |
| 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()
| 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
si.uuid(cb) {...} X X X X X object of several UUIDs
| os X X X X | os specific UUID
si.versions(cb) {...} X X X X X version information (kernel, ssl, node, ...)
si.shell(cb) : string 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 X average load
| currentload X | X X X CPU load in %
| currentload_user X | X X X CPU load user in %
| currentload_system X | X X X CPU load system in %
| currentload_nice X | X X X CPU load nice in %
| currentload_idle X | X X X CPU load idle in %
| currentload_irq X | X X X CPU load system in %
| raw_currentload... 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 X # of all processes running
| blocked X X X X X # of all processes blocked
| sleeping X 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].pcpu X X X X X process % CPU usage
| ...[0].pcpuu X X | X | process % CPU usage (user)
| ...[0].pcpus X X | X | process % CPU usage (system)
| ...[0].pmem X X X X X process memory %
| ...[0].priority X X X X X process priotity
| ...[0].mem_vsz X X X X X process virtual memory size
| ...[0].mem_rss 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 | pids
| [0].pcpu X X X | process % CPU
| [0].pmem 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 | SATA, PCIe, ...
| [0].smartStatus X | X X | S.M.A.R.T Status (see Known Issues)
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, ...)
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)
| ms X | X | interval length (for per second values)
si.fsSize(cb) [{...}] X X X X | returns array of mounted file systems
| [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].use X X X X | used in %
| [0].mount X X X X | mount point
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)
Function Result object Linux BSD Mac Win Sun Comments
si.networkInterfaces(cb) [{...}] X X X X X array of network interfaces
| [0].iface X X X X X interface
| [0].ifaceName X X X X X interface name (differs on Windows)
| [0].ip4 X X X X X ip4 address
| [0].ip6 X X X X X ip6 address
| [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].carrierChanges X | | # changes up/down
si.networkInterfaceDefault(cb) : string X X X X X get name of default network interface
si.networkStats(ifaces,cb) [{...}] 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_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_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(cb) [{...}] 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 | | process name
si.inetChecksite(url, cb) {...} 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, cb) : number X X X X X response-time (ms) to external resource
host parameter is optional (default 8.8.8.8)

11. Wifi networks

Function Result object Linux BSD Mac Win Sun Comments
si.wifiNetworks(cb) [{...}] 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 | frequengy in MHz
| [0].signalLevel X | X X | signal level in dB
| [0].quality X | X X | quaility 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

12. Docker

Function Result object Linux BSD Mac Win Sun Comments
si.dockerInfo(cb) {...} 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 kernal 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.dockerContainers(all, cb) [{...}] 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].state X X X X X created, running, exited
| [0].ports X X X X X array of ports
| [0].mounts X X X X X array of mounts
si.dockerContainerStats(ids, cb) [{...}] 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].mem_usage X X X X X memory usage in bytes
| [0].mem_limit X X X X X memory limit (max mem) in bytes
| [0].mem_percent X X X X X memory usage in percent
| [0].cpu_percent 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].cpu_stats X X X X X detailed cpu stats
| [0].percpu_stats X X X X X detailed per cpu stats
| [0].memory_stats X X X X X detailed memory stats
| [0].networks X X X X X detailed network stats per interface
si.dockerContainerProcesses(id, cb) [{...}] X X X X X array of processes inside a container
| [0].pid_host 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.dockerAll(cb) {...} X X X X X list of all containers including their stats
and processes in one single array

13. Virtual Box

Function Result object Linux BSD Mac Win Sun Comments
si.vboxInfo(cb) [{...}] 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

14. "Get All at once" - functions

Function Result object Linux BSD Mac Win Sun Comments
si.getStaticData(cb) {...} X X X X X all static data at once
si.getDynamicData(srv,iface,cb) {...} 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,cb) {...} 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

cb: Asynchronous Function Calls (callback)

Remember: all functions (except version and time) are implemented as asynchronous functions! There are now three ways to consume them:

Callback Style

const si = require('systeminformation');

si.cpu(function(data) {
    console.log('CPU Information:');
    console.log('- manufucturer: ' + data.manufacturer);
    console.log('- brand: ' + data.brand);
    console.log('- speed: ' + data.speed);
    console.log('- cores: ' + data.cores);
    console.log('- physical cores: ' + data.physicalCores);
    console.log('...');
})

Promises

Promises Style is new in version 3.0.

When omitting callback parameter (cb), then you can use all function in a promise oriented way. All functions (exept of version and time) are returning a promise, that you can consume:

const si = require('systeminformation');

si.cpu()
    .then(data => {
        console.log('CPU Information:');
        console.log('- manufucturer: ' + data.manufacturer);
        console.log('- brand: ' + data.brand);
        console.log('- speed: ' + data.speed);
        console.log('- cores: ' + data.cores);
        console.log('- physical cores: ' + data.physicalCores);
        console.log('...');
    })
    .catch(error => console.error(error));

Async / Await

Using async / await (available since node v7.6)

Since node v7.6 you can also use the async / await pattern. The above example would then look like this:

const si = require('systeminformation');

async function cpuData() {
    try {
        const data = await si.cpu();
        console.log('CPU Information:');
        console.log('- manufucturer: ' + data.manufacturer);
        console.log('- brand: ' + data.brand);
        console.log('- speed: ' + data.speed);
        console.log('- cores: ' + data.cores);
        console.log('- physical cores: ' + data.physicalCores);
        console.log('...');
    } catch (e) {
        console.log(e)
    }
}

Known Issues

macOS - Temperature Sensor

To be able to measure temperature on macOS I created a little additional package. 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:

$ npm install osx-temperature-sensor --save

systeminformation will then detect this additional library and return the temperature when calling systeminformations standard function cpuTemperature()

Windows Temperature, Battery, ...

wmic - 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 wmic 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

*: 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 this functions, you will get -1 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 values for network stats every second, your code should look like this:

const si = require('systeminformation');

setInterval(function() {
    si.networkStats().then(data => {
        console.log(data);
    })
}, 1000)

Beginning with the second call, you get network transfer values per second.

Finding new issues

I am happy to discuss any comments and suggestions. Please feel free to contact me if you see any possibility of improvement!

Comments

If you have ideas or comments, please do not hesitate to contact me.

Happy monitoring!

Sincerely,

Sebastian Hildebrandt, +innovations

Credits

Written by Sebastian Hildebrandt sebhildebrandt

Contributers

OSX Temperature: credits here are going to:

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 of the Debian Project, 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.

All other trademarks are the property of their respective owners.

License MIT license

The MIT License (MIT)

Copyright © 2014-2019 Sebastian Hildebrandt, +innovations.

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.

Further details see LICENSE file.

changelog

Changelog

Major Changes - Version 4

New Functions

  • chassis(): chassis information

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() better controller and display detection, fixes
  • versions() optimization, fixes
  • networkInterfaces() added operstate, type, duplex, mtu, speed, carrierChanges
  • networkStats() added stats for errors, dropped
  • added TypeScript definitions

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

For major (breaking) changes - version 3 and 2 see end of page.

Version history

Version Date Comment
4.14.7 2019-08-22 battery() windows acconnected improvement
4.14.6 2019-08-22 users() improved date time parsing
4.14.5 2019-08-22 fsSize() fix windows result as number
4.14.4 2019-07-20 verions() fix pip, pip3
4.14.3 2019-07-09 system() sku fix windows
4.14.2 2019-07-07 networkConnections() pid linux fix NAN
4.14.1 2019-07-04 graphics() added display position windows
4.14.0 2019-07-03 processes() added process path and params
4.13.2 2019-07-02 versions() fix getting all versions
4.13.1 2019-07-01 versions() gcc fix macos
4.13.0 2019-07-01 networkConnections() added PID and process
4.12.2 2019-06-24 system() added Raspberry PI 4 detection
4.12.1 2019-06-24 networkInterface() virtual interfaces macos, networkInterfaceDefault()
4.12.0 2019-06-21 networkInterface() added property virtual
4.11.6 2019-06-19 util bug fix
4.11.5 2019-06-19 dockerAll() bug fix
4.11.4 2019-06-17 type definitions bug fix
4.11.3 2019-06-16 graphics() optimization windows
4.11.2 2019-06-16 wifiNetworks() bug fixes
4.11.1 2019-06-15 updated docs
4.11.0 2019-06-14 wifiNetworks() added available wifi networks
4.10.0 2019-06-14 graphics() windows multiple display support
4.9.2 2019-06-12 type definitions bug fix
4.9.1 2019-06-11 networkStats() bug fix windows
4.9.0 2019-06-03 graphics() added vendor, refresh rate, current res
4.8.4 2019-06-03 vboxInfo() fixed call parameters
4.8.3 2019-06-01 vboxInfo() added stoppedSince, started, stopped
4.8.2 2019-05-31 dockerInfo() changed property naming style
4.8.1 2019-05-31 updated docs
4.8.0 2019-05-31 added vboxInfo() detailed virtual box info
4.7.3 2019-05-30 updated typescript typings
4.7.2 2019-05-30 versions() added virtualbox, java popup fix macos
4.7.1 2019-05-29 memLayout() fix macos mojave
4.7.0 2019-05-29 partial netBSD support
4.6.1 2019-05-29 get wmic path - fic windows
4.6.0 2019-05-27 added dockerInfo()
4.5.1 2019-05-17 updated docs
4.5.0 2019-05-17 fsOpenFiles() added open file descriptor count
4.4.1 2019-05-11 updated docs
4.4.0 2019-05-11 dockerContainers() added started, finished time
4.3.0 2019-05-09 dockerContainers() dockerStats() added restartCount
4.2.1 2019-05-09 networkInterfaceDefault() time delay fix (linux)
4.2.0 2019-05-09 osInfo() extended service pack version (windows)
4.1.8 2019-05-09 graphics() resolve on error (windows)
4.1.7 2019-05-09 users() parsing fix (windows)
4.1.6 2019-04-24 memory() swap used fix (linux)
4.1.5 2019-04-19 refactored wmic calls to work also on Windows XP
4.1.4 2019-03-26 networkInterfaces() speed bug (windows)
4.1.3 2019-03-24 wmic path detection (windows)
4.1.2 2019-03-23 updated docs
4.1.1 2019-03-13 updated typescript typings
4.1.0 2019-03-13 versions() added pip, pip3
4.0.16 2019-03-12 Happy birthday - 5th aniversary
4.0.15 2019-03-02 versions() added java, python3, optimized gcc
4.0.14 2019-03-01 updated typescript typings
4.0.13 2019-03-01 diskLayout() added device (/dev/sda...) linux, mac
4.0.12 2019-03-01 diskLayout() linux rewritten - better detection
4.0.11 2019-02-23 users() fix windows (time), added @ts-check
4.0.10 2019-02-10 networkInterfaceDefault() fix windows
4.0.9 2019-02-08 cpu() fix, code cleanup
4.0.8 2019-02-05 inetLatency() Windows fix parse chinese output
4.0.7 2019-02-05 inetLatency() Windows fix
4.0.6 2019-02-04 powershell catch error
4.0.5 2019-02-03 updated docs
4.0.4 2019-02-03 code cleanup, updated docs
4.0.3 2019-02-03 networkInterfaces(), chassis() fixed two more issues
4.0.2 2019-02-03 networkInterfaces(), chassis() fixed smaller issues
4.0.1 2019-02-02 updated docs
4.0.0 2019-02-02 new major version
3.54.0 2018-12-30 added TypeScript type definitions
3.53.1 2018-12-29 versions() bug fix nginx version
3.53.0 2018-12-29 versions() added perl, python, gcc
3.52.7 2018-12-29 versions() bug fix macOS detection
3.52.6 2018-12-28 versions() bug fix macOS
3.52.5 2018-12-28 preparing automated tests, travis-ci integration, added dev-dependencies
3.52.4 2018-12-27 graphics().controllers bugfix linux
3.52.3 2018-12-27 os().codepage bugfix
3.52.2 2018-12-17 code cleanup
3.52.1 2018-12-17 inetChecksite() bugfix windows
3.52.0 2018-12-15 cpu() added physical cores, processors, socket type
3.51.4 2018-12-05 versions() bugfix, optimization postgres
3.51.3 2018-11-27 mem() refactoring parsing linux, code cleanup
3.51.2 2018-11-26 mem() bugfix parsing free output linux
3.51.1 2018-11-26 processLoad() bugfix windows
3.51.0 2018-11-25 processLoad() added for windows
3.50.3 2018-11-25 processLoad(), services() fixed cpu data (linux)
3.50.2 2018-11-23 network mac adresses: ip support fix
3.50.1 2018-11-23 services() added possibility to specify ALL services "*" for win
3.50.0 2018-11-23 services() added possibility to specify ALL services "*" for linux
3.49.4 2018-11-21 battery() timeremaining optimization (linux) thanks to Jorai Rijsdijk
3.49.3 2018-11-20 memLayout() optimized parsing (win)
3.49.2 2018-11-19 code cleanup
3.49.1 2018-11-19 cpu().brand removed extra spaces, tabs
3.49.0 2018-11-19 added system uuid() (os specific), versions() added postgresql
3.48.4 2018-11-18 windows: garbled output because of codepage
3.48.3 2018-11-18 dockerContainerStats() fixed issue cpu_percent win
3.48.2 2018-11-18 dockerContainerStats() fixed issue cpu_percent, win exec
3.48.1 2018-11-17 docker...() fixed issue parsing docker socket JSON
3.48.0 2018-11-17 diskLayout() better interface detection (WIN), osInfo() added build, serial
3.47.0 2018-11-06 versions() added docker, postfix
3.46.0 2018-11-05 fixed issue versions(), added system openssl version
3.45.10 2018-11-03 fixed issue battery(), modified package.json - files
3.45.9 2018-10-22 fixed node 4 incompatibility
3.45.8 2018-10-22 system() fix Raspberry Pi detection
3.45.7 2018-10-05 fixed typos
3.45.6 2018-09-12 mem() bug parsing linux in other languages
3.45.5 2018-09-07 diskLayout() tiny bug S.M.A.R.T status windows
3.45.4 2018-09-06 added icon to README.md
3.45.3 2018-09-06 diskLayout() optimized media type detection (HD, SSD) on Windows
3.45.2 2018-09-05 updated imags shields icons
3.45.1 2018-09-05 updated documentation
3.45.0 2018-09-04 diskLayout() added smartStatus
3.44.2 2018-08-28 added code quality badges
3.44.1 2018-08-28 code cleanup
3.44.0 2018-08-25 battery() bugfix & added type, model, manufacturer, serial
3.43.0 2018-08-25 cpuCurrentspeed() added cpu speed for all cores
3.42.10 2018-08-25 processes() optimized start time parsing
3.42.9 2018-08-08 cpuTemperature() optimized parsing
3.42.8 2018-08-03 updated docs
3.42.7 2018-08-03 processes() optimized parsing ps name
3.42.6 2018-08-03 processes() bugfix parsing ps linux
3.42.5 2018-08-03 processes() bugfix parsing ps linux
3.42.4 2018-07-09 cpuTemperature() bugfix parsing negative values
3.42.3 2018-07-05 services() bugfix not finding services with capital letters
3.42.2 2018-07-03 users() optimized results if lack of permissions
3.42.1 2018-07-03 versions() bugfix git version macOS
3.42.0 2018-06-01 processes() added parent process PID
3.41.4 2018-05-28 windows exec WMIC path detection (windows) in try catch
3.41.3 2018-05-13 improved SunOS support getStaticData(), getDynamicData()
3.41.2 2018-05-13 bugfix system() and flags() Raspberry Pi
3.41.1 2018-05-11 updated docs
3.41.0 2018-05-11 system() Raspberry Pi bugfix and extended detection, added partial SunOS support
3.40.1 2018-05-10 bugfix system().sku (windows)
3.40.0 2018-04-29 extended versions() (php, redis, mongodb)
3.39.0 2018-04-29 added versions().mysql and versions().nginx, starting SunOS support (untested)
3.38.0 2018-04-06 added battery().acconnected
3.37.12 2018-04-05 another optimization battery().ischarging for macOS
3.37.11 2018-04-05 another optimization battery().ischarging for macOS
3.37.10 2018-04-05 battery().ischarging optimized for macOS
3.37.9 2018-04-03 optimized processes(), bugfix networkInterfaceDefault()
3.37.8 2018-03-25 optimized networkDefaultInterface() detection, fixed network operstate MacOS
3.37.7 2018-03-13 celebrating 4th birthday
3.37.6 2018-03-12 updated docs: fixed diskLayoutand mamlayout
3.37.5 2018-03-12 added support for ip instead of ifconfig
3.37.4 2018-02-22 bugfix windows processes(), disklayout()
3.37.3 2018-02-19 added windows exec windowsHide option
3.37.2 2018-02-15 fixed bug battery().percent for macOS
3.37.1 2018-02-13 fixed bug battery().ischarging for macOS
3.37.0 2018-02-11 extended FreeBSD support networkStats()
3.36.0 2018-02-11 extended FreeBSD support networkConnections()
3.35.0 2018-02-11 extended FreeBSD support processLoad()
3.34.1 2018-02-11 updated docs
3.34.0 2018-02-10 first partial FreeBSD support
3.33.15 2018-01-21 optimized OSX battery
3.33.14 2018-01-17 bugfix diskLayout() (Windows)
3.33.13 2018-01-12 bugfix memLayout() (Windows)
3.33.12 2017-12-25 fixed typos
3.33.11 2017-12-17 updated docs
3.33.10 2017-12-14 bugfix WMIC path detection (windows) blockDevice parse (Windows 7)
3.33.9 2017-12-14 bugfix WMIC path detection (windows) not found (Windows)
3.33.8 2017-12-02 bugfix diskLayout().size (OSX)
3.33.7 2017-11-28 bugfix diskLayout().size
3.33.6 2017-11-16 bugfix diskLayout().size
3.33.5 2017-11-09 code cleanup
3.33.4 2017-11-09 bugfix graphics controller win (bytes)
3.33.3 2017-11-08 bugfix cpu speed arm - type
3.33.2 2017-11-08 bugfix cpu speed arm
3.33.1 2017-11-07 improved bios and main board information
3.33.0 2017-11-07 added bios and main board information
3.32.4 2017-11-02 AMD cpu base frequencies table also for windows
3.32.3 2017-11-02 code cleanup, AMD cpu base frequencies table
3.32.2 2017-11-01 bugfix JSON.parse error blockDevices()
3.32.1 2017-10-23 updated docs
3.32.0 2017-10-23 extended memLayout() - added manufacturer
3.31.4 2017-10-21 updated README.md
3.31.3 2017-10-21 bugfix graphics(), fixed typo README.md
3.31.2 2017-10-16 bugfix graphics() vendor and model parsing linux VGA/3D
3.31.1 2017-10-16 bugfix graphics() vendor and model parsing linux
3.31.0 2017-10-15 extended windows support cpuFlags() (partially)
3.30.6 2017-10-05 updated community profile
3.30.5 2017-10-05 bugfix users() - parsing values on windows
3.30.4 2017-10-03 bugfix cpuTemperature() - parsing values on windows
3.30.3 2017-10-03 bugfix cpuTemperature() - max value on windows
3.30.2 2017-09-26 bugfix networkInterfaces() - optimized ip6 address selection
3.30.1 2017-09-21 bugfix/typo inetChecksite()
3.30.0 2017-09-21 extended versions() (added yarn, gulp, grunt, tsc, git)
3.29.0 2017-09-15 extended windows support services(), optimized diskLayout() (OSX), bugfixes
3.28.0 2017-09-14 extended windows support processes()
3.27.1 2017-09-13 updated Raspberry version detection system() (Pi 3, Zero)
3.27.0 2017-09-12 added raw data to currentLoad(), fixed networkInterfaces() MAC problem node 8.x
3.26.2 2017-09-01 removed redundant code
3.26.1 2017-08-23 fixed cpu().speed windows / AMD, updated docs
3.26.0 2017-08-21 extended getDynamicData() (windows), updated docs
3.25.1 2017-08-07 updated docs
3.25.0 2017-08-07 improved windows support networkStats(), cpuCache(), bug fix getStaticData()
3.24.0 2017-08-05 extended windows support networkStats(), networkConnections()
3.23.7 2017-07-11 bug fix diskLayout()
3.23.6 2017-07-11 added cpuFlags() to getStaticData(), bug fix graphics() (Win)
3.23.5 2017-06-29 bug fix inetChecksite()
3.23.4 2017-06-24 bug fix getDynamicData(), getAllData() - mem
3.23.3 2017-06-23 updated docs
3.23.2 2017-06-23 bug fix battery (windows)
3.23.1 2017-06-22 updated docs
3.23.0 2017-06-22 added memLayout, diskLayout, extended windows support (inetChecksite)
3.22.0 2017-06-19 extended windows support (users, inetLatency)
3.21.0 2017-06-18 extended time (timezone), extended windows support (battery, getAll...)
3.20.1 2017-06-17 updated docs
3.20.0 2017-06-16 extend WIN support (cpu, cpuCache, cpuCurrentspeed, mem, networkInterfaces, docker)
3.19.0 2017-06-12 OSX temperature now an optional dependency
3.18.0 2017-05-27 extended cpu info (vendor, family, model, stepping, revision, cache, speedmin/max)
3.17.3 2017-04-29 minor fix (blockDevices data array, Windows)
3.17.2 2017-04-24 minor fix (removed console.log)
3.17.1 2017-04-23 fixed bugs fsSize(win), si.processes (command), si.osinfo(win)
3.17.0 2017-02-19 windows support for some first functions, extended process list (linux)
3.16.0 2017-01-19 blockDevices: added removable attribute + fix
3.15.1 2017-01-17 minor cpuTemperature fix (OSX)
3.15.0 2017-01-15 added cpuTemperature also for OSX
3.14.0 2017-01-14 added currentLoad per cpu/core, cpu cache and cpu flags
3.13.0 2016-11-23 added shell (returns standard shell)
3.12.0 2016-11-17 refactoring and extended currentLoad
3.11.2 2016-11-16 blockDevices: improved for older lsblk versions
3.11.1 2016-11-16 fixed small bug in blockDevices
3.11.0 2016-11-15 blockDevices for OSX and extended blockDevices
3.10.2 2016-11-14 bug fix fsSize on OSX
3.10.1 2016-11-14 optimization fsStats, disksIO, networkStats
3.10.0 2016-11-12 added blockDevices, fixed fsSize, added file system type
3.9.0 2016-11-11 added MAC address to networkInterfaces, fixed currentLoad
3.8.1 2016-11-04 updated docs
3.8.0 2016-11-04 added dockerContainerProcesses
3.7.1 2016-11-03 code refactoring
3.7.0 2016-11-02 extended docker stats, and no longer relying on curl
3.6.0 2016-09-14 added versions (kernel, ssl, node, npm, pm2, ...)
3.5.1 2016-09-14 bugfix graphics info
3.5.0 2016-09-14 added graphics info (controller, display)
3.4.4 2016-09-02 tiny fixes system.model, getDefaultNetworkInterface
3.4.3 2016-09-02 tiny bug fix fsStats, disksIO OSX
3.4.2 2016-09-01 improved default network interface
3.4.1 2016-08-30 updated docs
3.4.0 2016-08-30 rewritten processes current cpu usage
3.3.0 2016-08-24 process list added to processes
3.2.1 2016-08-19 updated docs, improvement system
3.2.0 2016-08-19 added battery information
3.1.1 2016-08-18 improved system and os detection (vm, ...), bugfix disksIO
3.1.0 2016-08-18 added Docker stats
3.0.1 2016-08-17 Bug-Fix disksIO, users, updated docs
3.0.0 2016-08-03 new major version 3.0
2.0.5 2016-03-02 changed .gitignore
2.0.4 2016-02-22 tiny correction - removed double quotes CPU brand, ...
2.0.3 2016-02-22 optimized cpuCurrentspeed
2.0.2 2016-02-22 added CoreOS identification
2.0.1 2016-01-07 minor patch
2.0.0 2016-01-07 new major version 2.0
1.0.7 2015-11-27 fixed: si.network_speed()
1.0.6 2015-09-17 fixed: si.users()
1.0.5 2015-09-14 updated dependencies
1.0.4 2015-07-18 updated docs
1.0.3 2015-07-18 bugfix cpu cores
1.0.2 2015-07-18 bugfix cpu_currentspeed, cpu_temperature
1.0.1 2015-07-18 documentation update
1.0.0 2015-07-18 bug-fixes, version bump, published as npm component
0.0.3 2014-04-14 bug-fix (cpu_speed)
0.0.2 2014-03-14 Optimization FS-Speed & CPU current speed
0.0.1 2014-03-13 initial release

Major (breaking) 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.
  • cpuCurrentspeed: now returns an object with current minimal, maximal and average CPU frequencies of all cores.
  • mem: now supports also newer versions of free (Version 3.3.10 and above); extended information avaliable (potentially available memory)
  • fsStats: added information sum bytes read + write (tx) and sum transfer rate/sec (tx_sec)
  • networkInterfaces: now providing one more detail: internal - true if this is an internal interface like "lo"
  • networkConnections: instead of only counting sockets, you now get an array of objects with connection details for each socket (protocol, local and peer address, state)
  • users: now provides an array of objects with users online including detailed session information (login date/time, ip address, terminal, command)
  • inetLatency: now you can provide a host against which you want to test latency (default is 8.8.8.8)
  • getDynamicData: changed order of parameters (callback - if provided - is now the last one): getDynamicData(srv, network, callback)
  • getAllData: changed order of parameters (callback - if provided - is now the last one): getAllData(srv, network, callback)

New Functions

  • FreeBSD support: for some basic functions (new in version 3.34 ff)
  • diskLayout: returns hard disk layout (new in version 3.23)
  • memLayout: returns memory chip layout (new in version 3.23)
  • Windows support: for some basic functions (new in version 3.17 ff)
  • cpuCache: returns CPU cache (L1, L2, L3) sizes (new in version 3.14)
  • cpuFlags: returns CPU flags (new in version 3.14)
  • currentLoad.cpus: returns current load per cpu/core in an array (new in version 3.14)
  • shell: returns standard shell e.g. /bin/bash (new in version 3.13)
  • blockDevices: returns array of block devices like disks, partitions, raids, roms (new in version 3.10)
  • dockerContainerProcesses: returns processes for a specific docker container (new in version 3.8)
  • versions: returns object of versions - kernel, ssl, node, npm, ...(new in version 3.6)
  • graphics: returns arrays of graphics controllers and displays (new in version 3.5)
  • networkInterfaceDefault: returns default network interface (new in version 3.4)
  • processes: now returns also a process list with all process details (new in version 3.3)
  • battery: retrieves battery status and charging level (new in version 3.2)
  • dockerContainers: returns a list of all docker containers (new in version 3.1)
  • dockerContainerStats: returns statistics for a specific docker container (new in version 3.1)
  • dockerAll: returns a list of all docker containers including their stats (new in version 3.1)
  • disksIO: returns overall diskIO and IOPS values for all mounted volumes (new in version 3.0)

Bug Fixes / improvements

  • improvement cpuTemperature - works now also on Raspberry Pi
  • bugfix disksIO - on OSX read and write got mixed up
  • several bug fixes (like assess errors in cpuCurrentspeed, potentially incorrect results in users, ...)
  • testet on even more platforms and linux distributions

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

Major (breaking) Changes - Version 2

There had been a lot of changes in version 2 of systeminformation! Here is a quick overview (for those who come from version 1):

New Functions

  • version: returns systeminformation version (semver) of this library
  • system: hardware info (manufacturer, product/model name, version, serial, uuid)
  • networkConnections: number of active connections
  • inetLatency: latency in ms to external resource (internet)
  • getStaticData: returns on json object with static data at once (OS, CPU, Network Interfaces - they should not change until restarted)
  • getDynamicData: returns on json object with all dynamic data at once (e.g. for monitoring agents)
  • getAllData: returns on json object with all data (static and dynamic) at once

Renamed Functions (now all camelCase)

  • osinfo: renamed to osInfo
  • cpu_currentspeed: renamed to cpuCurrentspeed
  • cpu_temperature: renamed to cpuTemperature
  • fs_size: renamed to fsSize
  • fs_speed: renamed to fsStats
  • network_interfaces: renamed to networkInterfaces
  • network_speed: renamed to networkStats
  • network_connections: renamed to networkConnections
  • currentload: renamed to currentLoad
  • fullload: renamed to fullLoad
  • processload: renamed to processLoad
  • checksite: renamed to inetChecksite

Function Changes

  • cpu_temperature/cpuTemperature: -1 is new default (and indicates that non sensors are installed)
  • cpu_temperature/cpuTemperature: new result max which returns max temperature of all cores
  • cpu_currentspeed/cpuCurrentspeed: now in GHz
  • cpu: splitted manufacturer (e.g. Intel) and brand (e.g. Core 2 Duo)
  • network_speed/networkStats: now better support for OS X (also support for operstate)
  • network_speed/networkStats: overall received and transferred bytes (rx, tx)
  • mem: now better support for OS X (also support for swaptotal, swapused, swapfree)
  • fs_size/fsSize: use-values now in % (0 - 100% instead of 0 - 1)
  • fs_speed/fsStats: now also full support for OS X
  • checksite/inetChecksite: new result structure - see command reference
  • checksite/inetChecksite: ms (former response_ms): -1 if not ok

Other changes

  • osx-temperature-sensor: now added as an optional dependency
  • no more external dependencies: request is not longer needed
  • where possible results are now integer or float values (instead of strings) because it is easier to calculate with numbers ;-)