System Module

Operating System & Hardware (os)

Low-level telemetry and control over the host machine's hardware and process tree.

The os module provides deep insights into the physical and logical state of the server. Delegated to the **XHSC engine**, hardware queries execute outside the Node.js event loop for maximum accuracy and zero performance impact.

Hardware Telemetry

CPU Load

Real-time telemetry for aggregated load or individual logical cores.

typescript
const load = __sys__.os.cpu(); // Aggregated
const cores = __sys__.os.cpu(true); // Per-core stats

Memory & Swap

Precise reporting of available, used, and total physical RAM.

typescript
const ram = __sys__.os.memory();
.disks(mount?)

Storage volume monitoring.

.hardware (getter)

Deep architectural snapshot.

Process & Network Management

.processes(options?)

Natively queries the process tree. Internal XyPriss processes are automatically excluded from the results.

typescript
// Find top 3 memory-intensive processes
const topMem = __sys__.os.processes({ topMem: 3 });
.ports()

Inspect active networking sockets and PIDs.

.kill(target)

Terminate processes by PID or exact name.

Extended Features

.info()

Comprehensive system/OS snapshot.

.network()

IO stats and interface throughput.

.monitorProcess()

Temporal watch on specific PID.

Sensors & Environment

.temp()

Thermal sensor data.

.battery()

Power & charging state.

.health()

Aggregated health report.

.homeDir()

User home directory.

.platform()
.arch()
.monitor()
Utilities

High-performance suite for string manipulation, data validation, and logic.