一个只读 /proc 和 sysfs 的守护进程,通过 D-Bus 对外提供数据;悬浮窗、托盘、命令行和 GTK4 设置界面全部订阅同一份数据,不用各自读系统文件。
/proc
X11 悬浮窗:上下行速率、CPU 使用率(带内联温度)、内存、GPU 使用率(带内联温度)。可拖动、悬停穿透、调透明度、置顶;浅色壁纸下会自动加深文字对比度。
CPU 14% 70°C
warn
crit
StatusNotifierItem + DBusMenu:暂停/恢复、显隐悬浮窗、切换网卡、打开设置界面或配置文件、退出。
SQLite 按分钟 / 日 / 月聚合,trafficview history today / history month 查看。
trafficview history today
history month
阈值 + 持续时间 + 冷却时间 + 静默时段,触发后发送桌面通知。
text、json、waybar、polybar、tmux,trafficview status --format waybar 直接输出。
text
json
waybar
polybar
tmux
trafficview status --format waybar
GTK4 + libadwaita,六个页面:通用 / 网络 / 显示 / 告警 / 历史 / 插件。
内置规则按优先级命中:
coretemp/Package
k10temp/Tdie
Tctl
zenpower/Tdie
x86_pkg_temp
cpu_thermal
soc_thermal
hwmon 和 /sys/class/thermal 双来源自动合并去重;没命中任何规则时返回 None,不拿 NVMe / GPU / 主板温度兜底。
/sys/class/thermal
None
支持配置覆盖:
[overlay] cpu_temp_sensor = "k10temp/Tdie" # 精确 label 或子串均可
GpuSample 新增 temp_celsius: Option,温度归属于 GPU 自身:
GpuSample
temp_celsius: Option
card*/device/hwmon/hwmon*/temp*_input
edge
junction
mem
temperature.gpu
nvmlDeviceGetTemperature
D-Bus gpu / gpus[] 字典新增可选键 temp_celsius,旧客户端完全兼容。
gpu
gpus[]
temp_celsius
format 同时支持 {cpu_temp} 和 {gpu_temp} 占位符:
format
{cpu_temp}
{gpu_temp}
[[overlay.items]] id = "cpu" label = "CPU" format = "{value} {cpu_temp}" # 两个空格,让百分比和温度之间有呼吸感 [[overlay.items]] id = "gpu" label = "GPU" format = "{value} {gpu_temp}" color = "#B197FC" visible = true
无读数时温度段自动为空并压缩多余空白——不会留下 CPU 14% 这种尾巴。
CPU 14%
sudo dpkg -i trafficview_1.1.0-1_amd64.deb
安装后 daemon、托盘和悬浮窗(仅 X11)在登录时自动启动,由 /usr/libexec/trafficview-session 托管。也可以手动:
/usr/libexec/trafficview-session
systemctl --user enable --now trafficviewd nohup /usr/bin/trafficview tray >/dev/null 2>&1 & nohup /usr/bin/trafficview overlay --session x11 >/dev/null 2>&1 &
git clone https://github.com/umgsai/TrafficView.git cd TrafficView cargo build --workspace --release cargo build --manifest-path frontends/settings/Cargo.toml # 设置界面 ./packaging/build-deb.sh # 打 deb 包
~/.config/trafficview/config.toml:
~/.config/trafficview/config.toml
[overlay] cpu_temp_sensor = "" # 空值 = 自动识别 [[overlay.items]] id = "cpu" label = "CPU" unit = "%" format = "{value} {cpu_temp}" color = "#FFD43B" visible = true [[overlay.items]] id = "gpu" label = "GPU" unit = "%" format = "{value} {gpu_temp}" color = "#B197FC" visible = true
追加配置后执行一次热加载即可生效,无需重启:
trafficview config set overlay.cpu_temp_sensor ""
/proc, sysfs, netlink │ ▼ 只读守护进程 trafficviewd ─── D-Bus (com.trafficview.Daemon1) │ │ │ ├── X11 悬浮窗 │ ├── StatusNotifierItem 托盘 │ ├── GTK4 设置界面 │ └── CLI (status / history / alerts) │ ▼ SQLite 历史统计 + 阈值告警
关键约束:
CollectorStatus { available, reason }
GpuSample.temp_celsius
Snapshot.gpu_temp
docs/releases/
gpus[0]
欢迎 Issue / PR 交流~
把系统自带的监控器固定到系统工具栏之后,自带类似的功能
Featured Collection
Popular Ranking
Popular Events
TrafficView:轻量 Linux 桌面流量与系统监控,守护进程 + D-Bus 架构
主界面长这样
X11 悬浮窗:上下行速率、CPU 使用率(带内联温度)、内存、GPU 使用率(带内联温度)。可拖动、悬停穿透、调透明度、置顶;浅色壁纸下会自动加深文字对比度。
核心特性
悬浮窗
CPU 14% 70°C),也可以单独一行warn/crit配色)托盘
StatusNotifierItem + DBusMenu:暂停/恢复、显隐悬浮窗、切换网卡、打开设置界面或配置文件、退出。
历史统计
SQLite 按分钟 / 日 / 月聚合,
trafficview history today/history month查看。告警
阈值 + 持续时间 + 冷却时间 + 静默时段,触发后发送桌面通知。
多前端输出
text、json、waybar、polybar、tmux,trafficview status --format waybar直接输出。设置界面
GTK4 + libadwaita,六个页面:通用 / 网络 / 显示 / 告警 / 历史 / 插件。
v1.1.0 新亮点
CPU 温度自动识别 + 配置覆盖
内置规则按优先级命中:
coretemp/Packagek10temp/Tdie(回退Tctl)zenpower/Tdiex86_pkg_tempcpu_thermal/soc_thermalhwmon 和
/sys/class/thermal双来源自动合并去重;没命中任何规则时返回None,不拿 NVMe / GPU / 主板温度兜底。支持配置覆盖:
GPU 使用率 + 温度
GpuSample新增temp_celsius: Option,温度归属于 GPU 自身:card*/device/hwmon/hwmon*/temp*_input读取,label 优先edge,回退junction、memtemperature.gpu+ NVML 动态符号nvmlDeviceGetTemperatureNone,只显示利用率D-Bus
gpu/gpus[]字典新增可选键temp_celsius,旧客户端完全兼容。显示模板泛化
format同时支持{cpu_temp}和{gpu_temp}占位符:无读数时温度段自动为空并压缩多余空白——不会留下
CPU 14%这种尾巴。快速安装
Debian / Ubuntu
安装后 daemon、托盘和悬浮窗(仅 X11)在登录时自动启动,由
/usr/libexec/trafficview-session托管。也可以手动:源码构建
个性化配置示例
~/.config/trafficview/config.toml:追加配置后执行一次热加载即可生效,无需重启:
架构
关键约束:
CollectorStatus { available, reason },不伪造零值GpuSample.temp_celsius属于 GPU 自身,而不是顶层Snapshot.gpu_temp技术栈
项目链接
docs/releases/发行说明已知限制
gpus[0],后续可加配置选择欢迎 Issue / PR 交流~