使用Prometheus监控Padavan路由器

Prometheus监控Padavan路由器

1、背景

近期在Synology(群辉)中安装一套Prometheus监控程序,目前已经监控Synology,然后家中有有路由器(Padavan)型号,也准备使用Prometheus+Grafan进行监控。

环境:

Prometheus:2.48.0

Grafan:10

Padavan:固件版本:3.4.3.9-099_22-05-1

image

2、监控步骤

1、padavan_exporter 正确使用

地址:https://github.com/Bpazy/padavan_exporter/blob/master/README-zh_CN.md

padavan_exporter有两种方式(不是放到Padavan系统上的)

  1. 安装到Linux操作系统,通过ssh连接到路由器进行数据获取
  2. 安装到Docker上,通过ssh连接到路由器进行数据获取
Linux操作系统

在Linux操作系统下载padavan_exporter

参数使用

$ ./padavan_exporter --help
Flags:--help                        Show context-sensitive help (also try--help-long and --help-man).--web.listen-address=":9100"  Address on which to expose metrics and webinterface--padavan.ssh.host="127.0.0.1:22"Padavan ssh host--padavan.ssh.username="admin"Padavan ssh username--padavan.ssh.password="admin"Padavan ssh password--debug                       Debug mode

安装 padavan_exporter 并使用正确的参数启动(点击跳转项目首页)

wget https://github.com/Bpazy/padavan_exporter/releases/download/v0.0.2/padavan_exporter-linux-amd64-v0.0.2
sudo mv ./padavan_exporter-linux-amd64-v0.0.2 /usr/local/bin/padavan_exporter
sudo chmod u=rwx,o=rx,g=rx /usr/local/bin/padavan_exporter
sudo chgrp root /usr/local/bin/padavan_exporter
sudo chown root /usr/local/bin/padavan_exporter# 自定义 systemd service
sudo touch /lib/systemd/system/padavan_exporter.service
sudo cat <<EOF >/lib/systemd/system/padavan_exporter.service
[Unit]
Description=Node exporter
After=network.target[Service]
Type=simple
ExecStart=/usr/local/bin/padavan_exporter  --padavan.ssh.host="127.0.0.1:22"  --padavan.ssh.username="admin"  --padavan.ssh.password="admin"
Restart=on-failure[Install]
WantedBy=multi-user.target
EOF# 加载自定义的 service
sudo systemctl daemon-reload
# 开机自启
sudo systemctl enable padavan_exporter 
# 启动
sudo systemctl start padavan_exporter 

Docker Compose(推荐)

当然更好的方式是使用 Docker Compose,你可以参考本项目预置的 docker-compose.yml 文件。

此处要注意,我把9100端口 映射到 9101,因为 我的 9100端口已经被占用,你们要注意

version: '3'
services:padavan_exporter:image: bpazy/padavan_exporter:latestrestart: alwaysports:- "9101:9100"command: ["--padavan.ssh.host=192.168.123.1:22", "--padavan.ssh.username=admin", "--padavan.ssh.password=admin"]

image

测试数据

image

Prometheus修改配置重载
- job_name: 'padavan'static_configs:- targets: ['192.168.123.200:9101']

2、Grafana 导入图形

这个图在Dashboard: https://grafana.com/grafana/dashboards/15978 进行修改 根补充

Padavan

如果导入没数据,请编辑
在这里插入图片描述

然后在Prometheus上进行调试
在这里插入图片描述

下载Json文件导入
Padavan-1701611865144.json

{"__inputs": [{"name": "DS_PROMETHEUS","label": "Prometheus","description": "","type": "datasource","pluginId": "prometheus","pluginName": "Prometheus"}],"__elements": {},"__requires": [{"type": "grafana","id": "grafana","name": "Grafana","version": "10.2.2"},{"type": "panel","id": "graph","name": "Graph (old)"},{"type": "datasource","id": "prometheus","name": "Prometheus","version": "1.0.0"},{"type": "panel","id": "timeseries","name": "Time series"}],"annotations": {"list": [{"builtIn": 1,"datasource": {"type": "datasource","uid": "grafana"},"enable": true,"hide": true,"iconColor": "rgba(0, 211, 255, 1)","name": "Annotations & Alerts","type": "dashboard"}]},"description": "Padavan exporter's Dashboard 南宫乘风 fix ","editable": true,"fiscalYearStartMonth": 0,"gnetId": 15978,"graphTooltip": 2,"id": null,"links": [{"asDropdown": false,"icon": "external link","includeVars": false,"keepTime": false,"tags": [],"targetBlank": false,"title": "如果不显示数据,请手动修改 页面中的标签数据(请点击,请查询博客教程)","tooltip": "","type": "link","url": "https://blog.csdn.net/heian_99"}],"liveNow": false,"panels": [{"collapsed": false,"gridPos": {"h": 1,"w": 24,"x": 0,"y": 0},"id": 9,"panels": [],"title": "基础信息","type": "row"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisBorderShow": true,"axisCenteredZero": false,"axisColorMode": "text","axisLabel": "负载","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"insertNulls": false,"lineInterpolation": "linear","lineWidth": 2,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"decimals": 2,"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 11,"x": 0,"y": 1},"id": 15,"options": {"legend": {"calcs": ["max","min","mean"],"displayMode": "table","placement": "bottom","showLegend": true},"tooltip": {"mode": "multi","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "node_load1{job=\"padavan\"}","instant": false,"legendFormat": "1分钟负载","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "node_load5{job=\"padavan\"}","hide": false,"instant": false,"legendFormat": "5分钟负载","range": true,"refId": "B"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "node_load15{job=\"padavan\"}","hide": false,"instant": false,"legendFormat": "15分钟负载","range": true,"refId": "C"}],"title": "设备负载","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"description": "","fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisBorderShow": false,"axisCenteredZero": false,"axisColorMode": "text","axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 25,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"insertNulls": false,"lineInterpolation": "smooth","lineStyle": {"fill": "solid"},"lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"fieldMinMax": true,"mappings": [],"min": 0,"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "percent"},"overrides": []},"gridPos": {"h": 9,"w": 12,"x": 11,"y": 1},"id": 14,"options": {"legend": {"calcs": ["max","min","mean"],"displayMode": "table","placement": "bottom","showLegend": true},"tooltip": {"mode": "multi","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "100- (\r\n  (\r\n    sum without (mode) (rate(node_cpu_seconds_total{job=\"padavan\", cpu=\"cpu\"}[5m]))\r\n    -\r\n    sum without (mode) (rate(node_cpu_seconds_total{job=\"padavan\",cpu=\"cpu\", mode=\"idle\"}[5m]))\r\n  ) / \r\n  sum without (mode) (rate(node_cpu_seconds_total{job=\"padavan\",cpu=\"cpu\"}[5m]))\r\n) * 100","instant": false,"legendFormat": "cpu使用率","range": true,"refId": "A"}],"title": "CPU使用率","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"description": "1H路由器数据","fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisBorderShow": true,"axisCenteredZero": false,"axisColorMode": "text","axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "bars","fillOpacity": 100,"gradientMode": "hue","hideFrom": {"legend": false,"tooltip": false,"viz": false},"insertNulls": false,"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "percent"},"thresholdsStyle": {"mode": "off"}},"decimals": 2,"fieldMinMax": false,"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "bytes"},"overrides": []},"gridPos": {"h": 9,"w": 11,"x": 0,"y": 10},"id": 8,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom","showLegend": true},"tooltip": {"mode": "multi","sort": "none"}},"pluginVersion": "10.2.2","targets": [{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "increase(node_network_receive_bytes_total{job=\"padavan\",device=~'br0|eth2.2'}[1h])","format": "time_series","interval": "30m","legendFormat": "{{device}} 下载","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","exemplar": false,"expr": "increase(node_network_transmit_bytes_total{job=\"padavan\",device=~'eth2|br0|eth2.2'}[1h])","interval": "30m","legendFormat": "{{device}}  上传","range": true,"refId": "B"}],"title": "1H路由器数据","type": "timeseries"},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"description": "","fieldConfig": {"defaults": {"links": []},"overrides": []},"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 11,"y": 10},"hiddenSeries": false,"id": 4,"legend": {"avg": false,"current": false,"max": false,"min": false,"show": true,"total": false,"values": false},"lines": true,"linewidth": 1,"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "10.2.2","pointradius": 2,"points": false,"renderer": "flot","seriesOverrides": [{"$$hashKey": "object:250","alias": "ppp0 receive rate","color": "#5794F2","fill": 0,"yaxis": 2},{"$$hashKey": "object:251","alias": "ppp0 receive total","color": "#B877D9"}],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "increase(node_network_receive_bytes_total{job=\"padavan\", device=~\"eth2.2|br0\"}[1000w])","interval": "","legendFormat": "{{device}} 接收总数","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "rate(node_network_receive_bytes_total{device=~\"eth2.2|br0\", job=\"padavan\"}[1m])","interval": "","legendFormat": "{{device}}  接收速率","range": true,"refId": "B"}],"thresholds": [],"timeRegions": [],"title": "网络下载总计","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"$$hashKey": "object:268","format": "decbytes","label": "Receive Total","logBase": 1,"show": true},{"$$hashKey": "object:269","format": "Bps","label": "Receive Rate","logBase": 1,"show": true}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"description": "","fieldConfig": {"defaults": {"links": []},"overrides": []},"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 11,"x": 0,"y": 19},"hiddenSeries": false,"id": 6,"legend": {"avg": false,"current": false,"max": false,"min": false,"show": true,"total": false,"values": false},"lines": true,"linewidth": 1,"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "10.2.2","pointradius": 2,"points": false,"renderer": "flot","seriesOverrides": [{"$$hashKey": "object:824","alias": "ppp0 download bandwidth","color": "#5794F2"},{"$$hashKey": "object:825","alias": "ppp0 upload bandwidth","color": "#73BF69"}],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "rate(node_network_transmit_bytes_total{device=~\"eth2.2|br0\",  job=\"padavan\"}[1m])*8","instant": false,"interval": "","legendFormat": "{{device}} 上传","refId": "A"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "rate(node_network_receive_bytes_total{device=~\"eth2.2|br0\",  job=\"padavan\"}[1m])*8","instant": false,"interval": "","legendFormat": "{{device}} 下载","refId": "B"}],"thresholds": [],"timeRegions": [],"title": "网络带宽","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"$$hashKey": "object:838","format": "decbits","label": "","logBase": 1,"show": true},{"$$hashKey": "object:839","format": "short","label": "","logBase": 1,"show": false}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"fieldConfig": {"defaults": {"links": []},"overrides": []},"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 11,"y": 19},"hiddenSeries": false,"id": 2,"legend": {"avg": false,"current": false,"max": false,"min": false,"show": true,"total": false,"values": false},"lines": true,"linewidth": 1,"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "10.2.2","pointradius": 2,"points": false,"renderer": "flot","seriesOverrides": [{"$$hashKey": "object:723","alias": "ppp0 transmit rate","color": "#73BF69","fill": 0,"yaxis": 2},{"$$hashKey": "object:724","alias": "ppp0 transmit total","color": "#B877D9"}],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "increase(node_network_transmit_bytes_total{job=\"padavan\",  device=~\"eth2.2|br0\"}[1000w])","interval": "","legendFormat": "{{device}} 上传总计","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "${DS_PROMETHEUS}"},"editorMode": "code","expr": "rate(node_network_transmit_bytes_total{device=~\"eth2.2|br0\", job=\"padavan\"}[1m])","interval": "","legendFormat": "{{device}} 上传速率","range": true,"refId": "B"}],"thresholds": [],"timeRegions": [],"title": "网络上传总计","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"$$hashKey": "object:741","format": "decbytes","label": "Transmit Total","logBase": 1,"show": true},{"$$hashKey": "object:742","format": "Bps","label": "Transmit Rate","logBase": 1,"show": true}],"yaxis": {"align": false,"alignLevel": 0}}],"refresh": "10s","schemaVersion": 38,"tags": ["jokersy"],"templating": {"list": []},"time": {"from": "now-1h","to": "now"},"timepicker": {"refresh_intervals": ["10s","30s","1m","5m","15m","30m","1h","2h","1d"]},"timezone": "","title": "Padavan","uid": "5BoX3my7z","version": 30,"weekStart": ""
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/194010.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

采集工具-免费采集器下载

在当今信息时代&#xff0c;互联网已成为人们获取信息的主要渠道之一。对于研究者和开发者来说&#xff0c;如何快速准确地采集整个网站数据是至关重要的一环。以下将从九个方面详细探讨这一问题。 确定采集目标 在着手采集之前&#xff0c;明确目标至关重要。这有助于确定采集…

冲突域和广播域

文章目录 冲突域广播域 冲突域 在网络内部两个数据帧同时进行传输时&#xff0c;产生与发生冲突的区域&#xff0c;所有共享介质都是一个冲突域。冲突域时基于第一层&#xff0c;物理层的。 集线器和中继器因为都在物理层&#xff0c;没有MAC地址表&#xff0c;所以不能隔离冲…

数据结构之堆排序以及Top-k问题详细解析

个人主页&#xff1a;点我进入主页 专栏分类&#xff1a;C语言初阶 C语言程序设计————KTV C语言小游戏 C语言进阶 C语言刷题 数据结构初阶 欢迎大家点赞&#xff0c;评论&#xff0c;收藏。 一起努力 目录 1.前言 2.堆排序 2.1降序排序 2.2时间复杂…

Prime 1.0

信息收集 存活主机探测 arp-scan -l 或者利用nmap nmap -sT --min-rate 10000 192.168.217.133 -oA ./hosts 可以看到存活主机IP地址为&#xff1a;192.168.217.134 端口探测 nmap -sT -p- 192.168.217.134 -oA ./ports UDP端口探测 详细服务等信息探测 开放端口22&#x…

【Vulnhub 靶场】【HackathonCTF: 2】【简单】【20210620】

1、环境介绍 靶场介绍&#xff1a;https://www.vulnhub.com/entry/hackathonctf-2,714/ 靶场下载&#xff1a;https://download.vulnhub.com/hackathonctf/Hackathon2.zip 靶场难度&#xff1a;简单 发布日期&#xff1a;2021年06月20日 文件大小&#xff1a;2.6 GB 靶场作者&…

54.多级缓存

目录 一、传统缓存的问题、多级缓存方案。 二、JVM进程缓存。 1&#xff09;进程缓存和缓存。 2&#xff09;导入商品案例。 1.安装MySQL 2.导入SQL 3.导入Demo工程 4.导入商品查询页面 3&#xff09;初识Caffeine&#xff08;就是在springboot学过的注解方式的cache&…

NAND Flash和NOR Flash的异同

NAND Flash和NOR Flash是两种常见的闪存类型。 NOR Flash是Intel于1988年首先开发出来的存储技术&#xff0c;改变了原先由EPROM和EEPROM一统天下的局面。 NAND Flash是东芝公司于1989年发布的存储结构&#xff0c;强调降低每比特的成本&#xff0c;更高的性能&#xff0c;并…

栈和队列OJ题——15.循环队列

15.循环队列 622. 设计循环队列 - 力扣&#xff08;LeetCode&#xff09; * 解题思路&#xff1a; 通过一个定长数组实现循环队列 入队&#xff1a;首先要判断队列是否已满&#xff0c;再进行入队的操作&#xff0c;入队操作需要考虑索引循环的问题&#xff0c;当索引越界&…

网络接口规范

1、基本物理层: a) RJ45接口作为最基本的网络接口之一有两种形式&#xff1a;对于百兆网口有4条线&#xff0c;2对差分线&#xff1b;对于千兆网口有4对差分线。RJ45水晶头是有8个凹槽和8个触点&#xff08;8p8c&#xff09;的接头&#xff0c;分为集成网络变压器和非集成网络变…

2022年9月8日 Go生态洞察:Go Developer Survey 2022 Q2 结果分析

&#x1f337;&#x1f341; 博主猫头虎&#xff08;&#x1f405;&#x1f43e;&#xff09;带您 Go to New World✨&#x1f341; &#x1f984; 博客首页——&#x1f405;&#x1f43e;猫头虎的博客&#x1f390; &#x1f433; 《面试题大全专栏》 &#x1f995; 文章图文…

物奇平台电容触摸功能调试

是否需要申请加入数字音频系统研究开发交流答疑群(课题组)?可加我微信hezkz17, 本群提供音频技术答疑服务,+群赠送语音信号处理降噪算法,蓝牙耳机音频,DSP音频项目核心开发资料, 物奇平台电容触摸功能调试 1 修改按键驱动宏 2 编译生成wpk 文件,import 导入烧录文件。…

水果编曲软件fl studio手机版下载

fl studio mobile手机版中文名水果编曲软件&#xff0c;它是一款非常不错的音乐编曲软件&#xff0c;凭借简单易上手的操作方式&#xff0c;强悍且实用的功能&#xff0c;深受到了音乐创作者的喜爱&#xff0c;不仅仅提供了广阔的音乐创作空间&#xff0c;可以让用户对舞曲、轻…

工具网站:随机生成图片的网站

一个随机生成图片的网站&#xff1a;Lorem Picsum。 有时候&#xff0c;我们做静态页面需要大量图片去填充内容&#xff0c;以使用该网站去生成指定尺寸的图片。每次打开页面都会获取不同的图片&#xff0c;就不用我们做静态页面开发的时候&#xff0c;绞尽脑汁去找图片了。 …

振南技术干货集:ChatGPT,现在我做单片机/嵌入式开发已经离不开它了!(2)

注解目录 &#xff08;此文部分内客由 ChatGPT 生成&#xff0c;你分得出来哪些是人写的&#xff0c;哪些是 ChatGPT 生成的吗?&#xff09; 20.1 恐怖的 ChatGPT 2023年ChatGPT有多火?比 TikTok火4 倍都不止!什么是“范式革命”?从石器时代到飞机大炮就是范式革命。AI绘…

Python读取栅格遥感影像并加以辐射校正后导出为Excel的一列数据

本文介绍基于Python语言中的gdal模块&#xff0c;读取一景.tif格式的栅格遥感影像文件&#xff0c;提取其中每一个像元的像素数值&#xff0c;对像素值加以计算&#xff08;辐射定标&#xff09;后&#xff0c;再以一列数据的形式将计算后的各像元像素数据保存在一个.csv格式文…

IDA常用操作、快捷键总结以及使用技巧

先贴一张官方的图&#xff0c;然后我再总结一下&#xff0c;用的频率比较高的会做一些简单标注 快捷键 F系列【主要是调试状态的处理】 F2 添加/删除断点F4 运行到光标所在位置F5 反汇编F7 单步步入F8 单步跳过F9 持续运行直到输入/断点/结束 shift系列【主要是调出对应的页…

【RotorS仿真系列】Ardrone模型介绍

ardrone是rotors仿真框架提供的一款机型&#xff0c;因为该机型与我们实际使用的机型参数相近&#xff0c;所以这里对它的参数做特别整理和记录。 一、模型参数总结 ardrone的gazebo模型如下图所示&#xff1a; 根据ardrone.yaml&#xff0c;其关键参数如下所示&#xff1a…

Project 1: The Game of Hog(CS61A)

&#xff08;第一阶段&#xff09;问题 5a&#xff08;3 分&#xff09; 实现该函数&#xff0c;该函数模拟了完整的 Hog 游戏。球员 交替轮流掷骰子&#xff0c;直到其中一名玩家达到分数。playgoal 您现在可以忽略 Feral Hogs 规则和论点; 您将在问题 5b 中实现它。feral_h…

树莓派多串口通信

树莓派多串口通信 串口配置串口通信函数分析串口通信示例代码 参考博文1&#xff1a;树莓派 4 UART 多串口配置通信参考博文2&#xff1a;树莓派wiringPi库详解关于树莓派相关其他环境配置可参考&#xff1a;快速上手树莓派关于wiringPi库初始化与IO口开发可参考&#xff1a;树…

调优--学习笔记

1&#xff0c;Presto调优 数据存储格式 1&#xff09;合理设置分区 与Hive类似&#xff0c;Presto会根据元信息读取分区数据&#xff0c;合理的分区能减少Presto数据读取量&#xff0c;提升查询性能。 2&#xff09;使用列式存储 Presto对ORC文件读取做了特定优化&#xff0c…