用 nmon 采集性能日志
把系统指标记录为 CSV,便于离线分析。
运行 nmon -f -s 1 -c 60 -m /tmp,每秒记录一次、共 60 个样本。
01命令
命令
$ nmon -f -s 1 -c 60 -m /tmp02作用说明
nmon 采样 CPU、内存、磁盘和网络,并可写出分隔符文件供其分析器或电子表格读取,非常适合在服务器上长时间无人值守采集。交互式监控器无法这样无界面运行。
03风险
!注意: 部分指标需要 root 才能读取;请确保采集具备所需权限并轮转旧日志。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- nmon.1.en.html manual page (Debian bookworm)依据: Documents nmon and its -f file mode and -s/-c sampling options.
最后验证: 2026-10-13 · 分类: 系统与设置