Memory

In this section you will learn how to get overall memory information (usage by OS) and memory module layout:

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

const si = require('systeminformation');

System Memory and Memory Layout

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.mem(cb) {...} X X X X X Memory information (object)
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 of objects)
[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