File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,11 +43,37 @@ FastAPI 挂 `StaticFiles` 一起发出去。所以:
4343| 心跳文件 | ` /run/gpu-fan-console/heartbeat ` | 主进程每轮写;过期则由看门狗强推 ` 8×0x00 ` 回落 |
4444| 依赖的 exporter | ipmi_exporter ` :9290 ` 、node_exporter ` :9100 ` 、DCGM ` :9400 ` | 都在 pve02 本机,都在跑 |
4545
46+ ### 2.1 三个 exporter 是怎么装的(pve02 实况,重装时照抄)
47+
48+ 控制台的** 全部数据源就是这三个 exporter** (实时读数直连 ` /metrics ` ,不走 Prometheus)。
49+ 没有它们,控制台进程照样能起(DCGM 挂了会降级 ` nvidia-smi ` 兜底),但控速依据为零——
50+ 所以** 首次部署时这一步要在装控制台之前完成** 。
51+
52+ | exporter | 部署形态 | 端口 | 提供的数据 |
53+ | ---| ---| ---| ---|
54+ | dcgm-exporter | docker 容器,` nvcr.io/nvidia/k8s/dcgm-exporter:4.6.0-4.8.3-distroless ` ,` --restart unless-stopped ` ,需宿主已装 NVIDIA 驱动并以 ` --gpus all ` 启动 | 9400 | GPU 温度 / 功率 / 利用率 / SM 频率 |
55+ | ipmi_exporter | systemd 服务,` /usr/local/bin/ipmi_exporter --web.listen-address=:9290 ` (v1.10.1),** 必须 root** (in-band 读 ` /dev/ipmi0 ` ,依赖 openipmi 驱动) | 9290 | 风扇转速 ` ipmi_fan_speed_rpm ` |
56+ | node_exporter | systemd 服务,` /usr/local/bin/node_exporter --collector.hwmon --collector.cpufreq ` | 9100 | CPU 温度 ` node_hwmon_temp_celsius ` (` label="Tctl" ` ) |
57+
58+ ⚠️ node_exporter ** 不带 ` --collector.hwmon ` 就没有 hwmon 指标** ,CPU 温度直接失明——
59+ 这个 flag 是这里的关键,升级二进制时别丢。
60+
61+ 装完自检三连(各返回至少一行数据才算就位):
62+
63+ ``` bash
64+ curl -s localhost:9400/metrics | grep DCGM_FI_DEV_GPU_TEMP | head -1
65+ curl -s localhost:9290/metrics | grep ipmi_fan_speed_rpm | head -1
66+ curl -s localhost:9100/metrics | grep Tctl | head -1
67+ ```
68+
4669---
4770
4871## 3. 首次部署(换机器 / 重装时才需要)
4972
5073``` bash
74+ # ⓪ 三个 exporter 先就位(dcgm-exporter / ipmi_exporter / node_exporter,见 2.1)
75+ # 它们是控制台的全部数据源,没有这一步控速无依据
76+
5177# ① 建目录、建 venv
5278ssh pve02
5379mkdir -p /opt/gpu-fan-console
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ scripts for Dell PowerEdge servers.**
3232通过 ` ipmitool raw 0x3a 0x01 ` 写给 BMC。
3333
3434- ** 数据采集** :GPU 温度走本地 DCGM exporter(` :9400 ` ),风扇转速走 ipmi_exporter
35- (` :9290 ` ),直连 exporter 读当下值;历史趋势另走 Prometheus。DCGM 不可用时降级 ` nvidia-smi ` 兜底
35+ (` :9290 ` ),CPU 温度走 node_exporter(` :9100 ` ,需 ` --collector.hwmon ` ),直连 exporter 读当下值;
36+ 历史趋势另走 Prometheus。DCGM 不可用时降级 ` nvidia-smi ` 兜底
3637- ** 控制曲线** :分段折线 + 滞回带(升温立即生效,降温须跌出滞回带才降档,
3738 避免「直升机效应」)。界面上可编辑曲线并** 试算预览** (` /api/curve/preview ` 走真实算法)
3839- ** 三种模式** :自动调档(按曲线)/ 手动定速(界面指定占空比)/ BMC 自动档(交还 BMC)
You can’t perform that action at this time.
0 commit comments