system-monitor-pro
v1.0.1
Published
Real-time system monitoring tool for Node.js with CPU and memory tracking
Maintainers
Readme
System Monitor
Real-time system monitoring tool for Node.js with CPU and memory tracking
Installation
npm install -g system-monitor-proQuick Start
- CLI Usage
system-monitor [options]Options:
--interval=: Update interval in milliseconds (default: 1000)
--no-clear: Disable console clearing between updates
--unit=: Memory unit (GB/MB, default: GB)
Example Output
System Monitor - <arch>
┌─────────┬───────────────┐
│ (index) │ Values │
├─────────┼───────────────┤
│ core │ 0 │
│ usage │ '15.2%' │
└─────────┴───────────────┘
Memory Usage: 3.45/8.00 GB - Programmatic Usage Integrate the monitor int your Node.js application:
import SystemMonitor from "system-monitor";
//* Create a monitor instance
const monitor = new SystemMonitor({
interval:1500,
clearConsole:true,
memoryUnit:'MB'
})
//* Start monitoring
const stop = monitor.start();
//* Stop monitoring after 10 seconds
setTimeout(()=>{
stop();
},10000)
