Processes and Services

In this section you will learn how to get information about current load, running processes and installed services:

For function reference and examples we assume, that we imported systeminformation as follows:

const si = require('systeminformation');

Current Load, Processes, Services

All functions in this section return a promise or can be called with a callback function (parameter cb in the function reference)

Function Result object Linux BSD Mac Win Sun Comments
si.currentLoad(cb) { ...} X X X X X CPU-Load
avgLoad X X X X X average load
(Windows: approximated - see note below)
currentLoad X X X X X CPU load in %
currentLoadUser X X X X X CPU load user in %
currentLoadSystem X X X X X CPU load system in %
currentLoadNice X X X X X CPU load nice in %
currentLoadIdle X 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 X CPU load hardware interrupts in %
currentLoadSteal X Time stolen by other OS running in VMs in %
currentLoadGuest X X X X X Time spent for running virtual CPU in %
rawCurrentLoad... X X X X X CPU load raw values (ticks)
cpus[] X X X X X current loads per CPU in % + raw ticks
avgLoad on Windows

Windows has no kernel load average. avgLoad is therefore approximated the way the unix kernel calculates it: an exponentially weighted moving average (1 / 5 / 15 minutes) over the number of busy cores. This average is only updated while currentLoad() is being called, so it starts from the average load since boot and converges towards the real value the longer your application polls the function. A single call cannot deliver a meaningful average.

Example
const si = require('systeminformation');
si.currentLoad().then(data => console.log(data));
{
  avgLoad: 0.23,
  currentLoad: 4.326328800988875,
  currentLoadUser: 2.595797280593325,
  currentLoadSystem: 1.73053152039555,
  currentLoadNice: 0,
  currentLoadIdle: 95.67367119901112,
  currentLoadIowait: 0.4213728191,
  currentLoadIrq: 0,
  rawCurrentLoad: 350,
  rawCurrentLoadUser: 210,
  rawCurrentLoadSystem: 140,
  rawCurrentLoadNice: 0,
  rawCurrentLoadIdle: 7740,
  rawCurrentLoadIrq: 0,
  rawCurrentLoadSteal: 0,
  rawCurrentLoadGuest: 0,
  cpus: [
    {
      load: 13.725490196078432,
      loadUser: 7.8431372549019605,
      loadSystem: 5.88235294117647,
      loadNice: 0,
      loadIdle: 86.27450980392157,
      loadIrq: 0,
      loadSteal: 0,
      loadGuest: 0,
      rawLoad: 140,
      rawLoadUser: 80,
      rawLoadSystem: 60,
      rawLoadNice: 0,
      rawLoadIdle: 880,
      rawLoadIrq: 0
      rawLoadSteal: 0
      rawLoadGuest: 0
    },
    ...
  ]
}
si.fullLoad(cb) : integer X X X X X CPU full load since bootup in %
Example
const si = require('systeminformation');
si.fullLoad().then(data => console.log(data));
4.2087723705022335
si.processes(cb) { ...} X X X X X # running processes
all X X X X X # of all processes
running X X X X # of all processes running
blocked X X X X # of all processes blocked
sleeping X X X X # of all processes sleeping
unknown X # of all processes unknown status
list[] X X X X X list of all processes incl. details
...[0].pid X X X X X process PID
...[0].parentPid X X X X X parent process PID
...[0].name X X X X X process name
...[0].cpu X X X X X process % CPU usage
...[0].cpuu X X X process % CPU usage (user)
...[0].cpus X X X process % CPU usage (system)
...[0].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
state on Windows

Windows does not expose a process state - Win32_Process.ExecutionState is documented as not implemented and always empty. The state is therefore derived from the threads of a process: at least one thread on or ready for a CPU is reported as running, all threads waiting as sleeping, and all threads suspended (what the task manager shows as "Suspended") as blocked. Processes whose threads cannot be read - protected system processes - stay unknown.

Example
const si = require('systeminformation');
si.processes().then(data => console.log(data));
{
  all: 258,
  running: 1,
  blocked: 0,
  sleeping: 157,
  unknown: 0,
  list: [
    {
      pid: 1,
      parentPid: 0,
      name: 'init',
      cpu: 0.04504576931569955,
      cpuu: 0.04084113255431208,
      cpus: 0.00420463676138747,
      cpuTime: 12.34,
      mem: 0,
      priority: 19,
      memVsz: 166144,
      memRss: 10684,
      nice: 0,
      started: '2020-02-08 10:18:15',
      state: 'sleeping',
      tty: '',
      user: 'root',
      command: 'init',
      params: '',
      path: '/sbin'
    },
    ...
  ]
}
si.processLoad('nginx, ssl',cb) [ { ...}] X X X X X detailed information about given processes
pass comma separated list or
'*' for all processes
[0].proc X X X X X process name
[0].pid X X X X X PID
[0].pids X X X X X additional pids
[0].cpu X X X X X process % CPU
[0].mem X X X X X process % MEM
Example
const si = require('systeminformation');
si.processLoad('nginx, postgres').then(data => console.log(data));
[
{
  proc: 'nginx',
  pid: 11267,
  pids: [
    11251, 11252, 11253,
    11254, 11255, 11256,
    11257, 11258, 11259,
    11260, 11261, 11262,
    11263, 11264, 11265,
    11266, 11267
  ],
  cpu: 0.01,
  mem: 0
},
  {
    proc: 'postgres',
    pid: 1435,
    pids: [
      1435, 1513, 1545,
      1546, 1547, 1548,
      1549, 1550
    ],
    cpu: 0.01,
    mem: 0
  },
]
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
Example
const si = require('systeminformation');
si.processFocused().then(data => console.log(data));
{
  pid: 73140,
  name: 'Safari',
  path: '/Applications/Safari.app/Contents/MacOS/Safari'
}
si.services('mysql, apache2', cb) [ { ...}] X X X X pass comma separated string of services
pass "*" for ALL services (linux/win only)
Linux: state, start mode and PIDs come from systemd, service names are matched exactly (case insensitive)
[0].name X X X X name of service
[0].running X X X X true / false
[0].startmode X X Windows: manual, automatic, ...
Linux (systemd): enabled, disabled, static, ...
[0].lastChanged X X X Linux (systemd): date of the last state change (ActiveEnter / ActiveExit)
macOS / BSD: start time of the service processes
[0].pids X X X pids
[0].cpu X X X process % CPU
[0].mem X X X process % MEM
Example
const si = require('systeminformation');
si.services('mysql, postgres').then(data => console.log(data));
[
  {
    name: 'mysql',
    running: true,
    startmode: 'enabled',
    lastChanged: 2026-08-27T07:15:42.000Z,
    pids: [ 152 ],
    cpu: 0.3,
    mem: 0
  },
  {
    name: 'postgres',
    running: true,
    startmode: 'enabled',
    lastChanged: 2026-08-26T18:02:11.000Z,
    pids: [ 1087, 1873 ],
    cpu: 0,
    mem: 0
  },
]

Getting correct stats values

In currentLoad() the results are calculated correctly beginning with the second call of the function. It is determined by calculating the difference of cpu ticks between two calls of the function.

The first time you are calling one of this functions, you will get the load since cpu uptime. The second time, you should then get statistics based on cpu ticks between the two calls ...

So basically, your code should look like this:

const si = require('systeminformation');

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

Beginning with the second call, you get precise load values between the two calls.