OS
Node.js os module — operating system utility functions. All system queries backed by Rust FFI to libc calls. Signal and errno constants are platform-aware (macOS vs Linux).
Module:node:os
Support: Experimental
Since: 1.1.0
Docs: Node.js Docs
23 members: 23 undocumented
Static Methods
Properties
The operating system end-of-line character sequence (`\n` on POSIX, `\r\n` on Windows).
The null device path (`/dev/null` on POSIX, `\\.\nul` on Windows).
→ object
---
Details
loadavg()
static loadavg(): sequence
static loadavg(): sequence<f64>
Returns the 1, 5, and 15-minute system load averages.
Returns: sequence<f64> Array of three load average values> Known issue: Always returns [0, 0, 0] on Windows
Dictionary CpuInfo
Information about a single logical CPU core.
Since: 1.1.0 Docs: Node.js Docs3 members: 3 undocumented
Properties
Information about a single logical CPU core.
CPU model name string.
Object with user, nice, sys, idle, and irq time fields (in milliseconds).
---
Dictionary NetworkInterface
Information about a single network interface address entry.
Since: 1.1.0 Docs: Node.js Docs6 members: 6 undocumented
Properties
Information about a single network interface address entry.
Subnet mask.
Subnet mask.
MAC address.
MAC address.
CIDR notation combining address and netmask.
---