In this section you will learn how to get information about installed graphics controllers and connected displays.
In version 6 the former graphics() function was split into two separate functions: gpu() (graphics controllers) and displays() (monitors / displays). Both return plain arrays.
On Windows, displays() reports physical monitors: in duplicate/mirror mode each mirrored monitor gets its own entry (sharing the resolution and position of the mirrored screen).
For function reference and examples we assume, that we imported systeminformation as follows:
const si = require('systeminformation');
Graphics Controllers
All functions in this section return a promise.
| 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].model | X | X | X | graphics controller model | |||
| [0].bus | X | X | X | on which bus (e.g. PCIe) | |||
| [0].vram | X | X | X | VRAM size (in MB) | |||
| [0].vramDynamic | X | X | X | true if dynamically allocated ram | |||
| [0].deviceId | X | (macOS only) - device ID | |||||
| [0].vendorId | X | (macOS only) - vendor ID | |||||
| [0].external | X | (macOS only) - is external GPU | |||||
| [0].cores | X | (Apple silicon only) - GPU cores | |||||
| [0].metalVersion | X | (macOS only) - Metal Version | |||||
| [0].subDeviceId | X | X | (optional nvidia-smi) - sub device ID | ||||
| [0].driverVersion | X | X | (optional nvidia-smi) - driver version | ||||
| [0].name | X | X | (optional nvidia-smi) - name | ||||
| [0].pciBus | X | X | (optional nvidia-smi) - PCI bus ID | ||||
| [0].fanSpeed | X | X | (optional nvidia-smi) - fan speed | ||||
| [0].memoryTotal | X | X | (optional nvidia-smi) - memory total | ||||
| [0].memoryUsed | X | X | (optional nvidia-smi) - memory used | ||||
| [0].memoryFree | X | X | (optional nvidia-smi) - memory free | ||||
| [0].utilizationGpu | X | X | (optional nvidia-smi) - utilization GPU | ||||
| [0].utilizationMemory | X | X | (optional nvidia-smi) - utilization memory | ||||
| [0].temperatureGpu | X | X | X | (optional nvidia-smi; macOS: optional macos-temperature-sensor) - temperature GPU | |||
| [0].temperatureMemory | X | X | (optional nvidia-smi) - temperature memory | ||||
| [0].powerDraw | X | X | (optional nvidia-smi) - power draw | ||||
| [0].powerLimit | X | X | (optional nvidia-smi) - power limit | ||||
| [0].clockCore | X | X | (optional nvidia-smi) - clock core | ||||
| [0].clockMemory | X | X | (optional nvidia-smi) - clock memory | ||||
Example
[
{
vendor: 'Intel',
model: 'Intel Iris Plus Graphics 655',
bus: 'Built-In',
vram: 1536,
vramDynamic: true
}
]
|
|||||||
Displays
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|---|---|---|---|---|---|---|---|
| si.displays() | [{...}] | X | X | X | array of monitors / displays | ||
| [0].vendor | X | monitor/display vendor | |||||
| [0].vendorId | X | (macOS only) - monitor/display 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].builtin | X | X | true if built-in monitor | ||||
| [0].connection | X | X | X | e.g. DisplayPort, 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].currentRefreshRate | X | X | X | current screen refresh rate | |||
Example
[
{
vendor: '',
model: 'Color LCD',
main: true,
builtin: false,
connection: 'Internal',
sizeX: null,
sizeY: null,
pixelDepth: 24,
resolutionX: 2560,
resolutionY: 1600,
currentResX: 2560,
currentResY: 1600,
positionX: 0,
positionY: 0,
currentRefreshRate: null
}
]
|
|||||||