cha133/cpu-moni

★ 0Forks 0JavaScriptGitHub ↗Compare

README

cpu-moni

Real-time CPU process monitor for terminal. Like htop, but simpler.

实时 CPU 进程监控工具,类似 htop,但更简洁。

Features / 功能

  • 🖥️ Real-time CPU monitoring / 实时 CPU 监控
  • 🌐 Auto language detection (Chinese/English) / 自动语言检测(中英文)
  • 🎨 Colorful terminal output / 彩色终端输出
  • ⚡ Flicker-free updates / 无闪烁更新
  • ⌨️ Press q or Ctrl+C to exit / 按 q 或 Ctrl+C 退出

Installation / 安装

# Use directly with npx (no installation required)
# 直接使用 npx(无需安装)
npx cpu-moni

# Or install globally
# 或全局安装
npm install -g cpu-moni
cpu-moni

Usage / 使用

# Show top 10 processes (default)
# 显示前 10 个进程(默认)
npx cpu-moni

# Show top 5 processes
# 显示前 5 个进程
npx cpu-moni 5

# Show top 20 processes
# 显示前 20 个进程
npx cpu-moni 20

# Show help
# 显示帮助
npx cpu-moni --help

Screenshot / 截图

  === CPU Process Monitor ===  10:30:45

  System CPU: [====----------------] 20.5%
  Showing top 5 processes

  ──────────────────────────────────────────────────────────────
  #    Process Name               CPU%      Memory        PID
  ──────────────────────────────────────────────────────────────
   1   chrome.exe                   5.2%   512.3 MB      1234
   2   node.exe                     2.1%   128.5 MB      5678
   3   code.exe                     1.5%   256.0 MB      9012
   4   explorer.exe                 0.8%    64.2 MB      3456
   5   svchost.exe                  0.3%    32.1 MB      7890
  ──────────────────────────────────────────────────────────────

  Refresh: 2s | Press q or Ctrl+C to exit

Requirements / 要求

  • Node.js >= 14.0.0

License / 许可

MIT

Contributors

cha133

Issues