首页 » 未分类 » 树莓派获取CPU和GPU温度

树莓派获取CPU和GPU温度

作者: vForce 分类: 未分类 发布时间: 2017-06-15 23:31 ė浏览 26,766 次 61条评论

最近剁了一个树莓派3B,打算做一个小型服务器用。因为比较担心温度问题,所以写了个小脚本用来自己经常看看温度的情况。


#!/bin/bash
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "CPU Temperature: temp=$((cpu/1000)) c"
gpu=$(vcgencmd measure_temp)
echo "GPU Temperature: $gpu"

该脚本也可以在github上直接下载使用


wget https://raw.githubusercontent.com/vForce825/serverUtils/master/raspberryTemperature.sh

chmod +x raspberryTemperature.sh

./raspberryTemperature.sh

本文出自 Tech Trace,转载时请注明出处及相应链接。

本文永久链接: https://www.qiujiahui.com/2017/06/15/%e6%a0%91%e8%8e%93%e6%b4%be%e8%8e%b7%e5%8f%96cpu%e5%92%8cgpu%e6%b8%a9%e5%ba%a6/

0

一条评论

  1. 电脑博士 2017年7月27日 上午9:38 回复

    我的nanopi neo现在温度50左右

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

Ɣ回顶部