Traffic Monitor
Skill by binyuli
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/binyuli/traffic-monitorTraffic Monitor Skill
version: 1.0.0
监控服务器网络流量使用情况,定期报告月度流量消耗。
背景
服务器每月有 2T 流量限制,需要监控使用情况避免超额。
快速查询
# 查看当前月度流量
vnstat -m -i eth0
# 查看实时流量
vnstat -l -i eth0
# 查看日流量
vnstat -d -i eth0
# 查看流量摘要
traffic_report.py
技能脚本
traffic_report.py
生成人类可读的流量报告:
python3 ~/.openclaw/skills/traffic-monitor/traffic_report.py
输出示例:
📊 本月流量统计
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📥 入站: 125.3 GB
📤 出站: 89.2 GB
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 总计: 214.5 GB / 2048 GB (10.5%)
⚠️ 剩余: 1833.5 GB
心跳检查
可以在 HEARTBEAT.md 中添加流量检查:
## 流量检查(每天一次)
- 运行 traffic_report.py
- 如果使用超过 80%,发送警告
配置
- 网卡: eth0
- 月度限制: 2TB (2048 GB)
- 警告阈值: 80% (1638 GB)
- 数据存储: /var/lib/vnstat/vnstat.db
注意事项
- vnstat 服务必须运行:
systemctl status vnstat - 首次安装需要几分钟收集数据
- 数据持久化存储,重启不丢失
- 统计的是网卡流量,包括所有出入站流量
相关命令
# 检查 vnstat 服务状态
systemctl status vnstat
# 重启 vnstat
systemctl restart vnstat
# 查看所有接口
vnstat --iflist
# 导出 JSON 格式
vnstat -m -i eth0 --json
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-binyuli-traffic-monitor": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
doc-export
将对话中解决的问题整理成方案文档,部署到 web 服务器供用户下载
luoyonghao-perspective
罗永浩的思维框架与表达方式。基于公开资料深度调研,提炼N个核心心智模型、N条决策启发式和完整的表达DNA。 用途:作为思维顾问,用罗永浩的视角分析问题、审视决策、提供反馈。 当用户提到「用罗永浩的视角」「罗永浩会怎么看」「老罗模式」「luoyonghao perspective」时使用。 即使用户只是说「帮我用老罗的角度想想」「如果罗永浩会怎么做」「切换到罗永浩」也应触发。
skill-packager
file types, or tasks that trigger it.
memos-memory-guide
Use the MemOS Local memory system to search and use the user's past conversations. Use this skill whenever the user refers to past chats, their own preferences or history, or when you need to answer from prior context. When auto-recall returns nothing (long or unclear user query), generate your own short search query and call memory_search. Available tools: memory_search, memory_get, memory_write_public, task_summary, skill_get, skill_search, skill_install, skill_publish, skill_unpublish, memory_timeline, memory_viewer.
skill-autosave
自动将任务经验沉淀为 skill。当任务满足沉淀条件时触发:使用了 5+ 次 tool call、遇到错误后找到正确解法、用户纠正了方法、或发现了可复用的多步骤 workflow。完成任务后自动评估是否值得沉淀,查重已有 skill,创建新 skill 或更新已有 skill。