cpustat 在 Debian 里通常指 sysstat 包中的 mpstat 类似工具,或者是指 LinkedIn 开源的 cpustat 工具(常用于性能分析)。两者都能“测 CPU”,但侧重点不同。下面分开说。
cpustat(通常是 sysstat 相关)如果你是通过 apt install cpustat 安装的,一般是 Colin Ian King 写的 cpustat(Ubuntu/Debian 有包)。
top,但更偏向 CPU 统计sudo cpustat 1 5
每秒采样一次,共 5 次
如果你是手动下载的 LinkedIn cpustat(Go 写的那款):
| 工具 | 测什么 |
|---|---|
top / htop |
进程 CPU 占用 |
mpstat |
CPU 整体/核心统计 |
vmstat |
CPU + 内存 + IO |
cpustat |
CPU 专注分析 + 进程 |
如果你愿意,可以告诉我:
apt install cpustat 装的哪个我可以给你具体命令和解读方法。