File tree Expand file tree Collapse file tree 3 files changed +42
-10
lines changed
Expand file tree Collapse file tree 3 files changed +42
-10
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # GPU 监控脚本使用说明
2+
3+ 该脚本用于定时采集指定 GPU 的温度和图形频率,支持高温/降频报警,并可将结果记录到日志文件中,适用于性能测试与运行状态监控。
4+
5+ ---
6+
7+ ## ✅ 脚本功能
8+
9+ - 支持指定 GPU 设备编号
10+ - 可自定义刷新时间间隔和记录次数
11+ - 实时记录温度(℃)与图形频率(MHz)
12+ - 高温(>95°C)或降频(<1750MHz)触发报警(门限可根据实际设备调整)
13+ - 监控结束后自动统计报警次数
14+ - 默认输出日志文件为:` gpu_monitor_log.txt `
15+
16+ ---
17+
18+ ## ⚙️ 参数说明
19+
20+ | 参数 | 含义 | 示例 |
21+ | ------| --------------------| -----------------|
22+ | ` -d ` | GPU 设备编号 | ` -d 0 ` |
23+ | ` -i ` | 刷新时间(单位:秒)| ` -i 1 ` |
24+ | ` -n ` | 记录次数(默认无限)| ` -n 10 ` |
25+
26+ > 如未指定 ` -n ` ,脚本将持续运行,直到手动停止。
27+
28+ ---
29+
30+ ## 🚀 使用示例
31+
32+ ### ✅ 前台运行
33+
34+ ``` bash
35+ ./monitor_gpu.sh -d 0 -i 1 -n 10
36+ ```
37+
38+ ### ✅ 后台运行
39+ ```
40+ nohup ./monitor_gpu.sh -d 0 -i 1 -n 100 > /dev/null 2>&1 &
41+ tail -f gpu_monitor_log.txt
42+ ```
File renamed without changes.
You can’t perform that action at this time.
0 commit comments