Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastos Supernode Monitor

Real-time resource monitoring for Elastos supernodes. Tracks CPU, RAM, disk, I/O, and network across all 10 chain services with historical data retention and exportable reports.

Monitored services: ELA, ESC, ESC-Oracle, EID, EID-Oracle, ECO, ECO-Oracle, PG, PG-Oracle, Arbiter


Installation

cd /opt && sudo git clone https://github.com/4HM3DMD/elastos-node-monitor.git && cd elastos-node-monitor && bash install.sh

The installer will:

  • Install Node.js 20.x if not present
  • Install dependencies (express, dotenv)
  • Auto-detect server specs and Elastos node directory
  • Generate an auth token and configure .env
  • Create and start a systemd service
  • Print the dashboard URL with your access token

Bookmark the printed URL — it contains your auth token.


Dashboard

System Overview

  • CPU / RAM / Disk gauges — real-time utilization with per-core breakdown
  • Resource attribution — stacked bar showing Elastos chains vs. other processes vs. idle
  • Load average, swap, cached memory, and disk growth rate

Per-Chain Breakdown

  • CPU usage as percentage of total system capacity
  • RAM and disk consumption per chain (GB)
  • Thread count, process uptime, and I/O throughput (read/write MB/s)

Historical Charts

  • CPU, RAM, disk, and network over 1 hour / 24 hours / 7 days / 30 days
  • Data collected every 3 seconds, retained for 30 days

Sizing Verdict

  • Observed peak and average utilization
  • Right-sized recommendation (2x CPU headroom, 1.5x RAM, 2-year disk projection)
  • Optional cost savings estimate

Data Export

  • Download JSON or CSV reports for any time range
  • Includes server specs, summary statistics, per-chain detail, and full time series
  • Use across multiple servers for side-by-side comparison

Configuration

Auto-generated by the installer in .env:

Variable Description Default
PORT Dashboard port 9999
AUTH_TOKEN Access token Auto-generated
ELASTOS_NODE_DIR Elastos node directory Auto-detected
DISK_MOUNT Disk partition to monitor / or /data
CPU_CORES Override CPU core count Auto-detected
RAM_GB Override RAM size Auto-detected
DISK_GB Override disk size Auto-detected

Management

sudo systemctl status elastos-monitor     # Status
sudo journalctl -u elastos-monitor -f     # Live logs
sudo systemctl restart elastos-monitor    # Restart
sudo systemctl stop elastos-monitor       # Stop

Update:

cd /opt/elastos-node-monitor && git pull && sudo systemctl restart elastos-monitor

Uninstall:

sudo systemctl disable --now elastos-monitor
sudo rm /etc/systemd/system/elastos-monitor.service
rm -rf /opt/elastos-node-monitor

Technical Details

  • Metrics collection: Reads /proc/stat, /proc/meminfo, /proc/net/dev, /proc/$PID/stat, /proc/$PID/status, /proc/$PID/io directly. Per-chain disk via du, system disk via df.
  • Process discovery: Matches Elastos binaries by comm field and oracle scripts by args from ps output. Aggregates child process CPU and RAM.
  • CPU tracking: Real-time deltas from /proc/$PID/stat (utime + stime), normalized to total system capacity.
  • Storage: Append-only JSONL files (data/YYYY-MM-DD.jsonl), one line per snapshot. 30-day retention with automatic pruning.
  • Frontend: Single HTML file, Chart.js, Tailwind CSS (CDN). No build step.
  • Dependencies: express, dotenv. No native modules.
  • Footprint: ~15 MB RAM, negligible CPU.

Firewall

Port 9999 must be accessible from your browser. If blocked:

sudo ufw allow 9999/tcp

Alternatively, use an SSH tunnel (no port exposure required):

ssh -L 9999:localhost:9999 user@YOUR_SERVER_IP
# Access at http://localhost:9999?token=YOUR_TOKEN

License

MIT

About

Lightweight resource monitor for Elastos supernodes — see if your server specs are overkill

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages