Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds rest of temperature components and decimal values for those #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Jetson-Nano-temperature

Bash script for measuring CPU and GPU temperature.
Bash script for measuring temperature components.

### Download
```sh
Expand All @@ -11,6 +11,9 @@ $ chmod 755 temp.sh
### Run
```sh
$ ./temp.sh
CPU 37°C
GPU 35°C
AO-therm: 36.00°C
CPU-therm: 27.00°C
GPU-therm: 27.50°C
PLL-therm: 25.50°C
thermal-fan-est: 27.00°C
```
13 changes: 5 additions & 8 deletions temp.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/bin/bash
echo "$(cat /sys/devices/virtual/thermal/thermal_zone0/type): $(echo "scale=2; $(cat /sys/devices/virtual/thermal/thermal_zone0/temp)/1000" |bc)°C"
echo "$(cat /sys/devices/virtual/thermal/thermal_zone1/type): $(echo "scale=2; $(cat /sys/devices/virtual/thermal/thermal_zone1/temp)/1000" |bc)°C"
echo "$(cat /sys/devices/virtual/thermal/thermal_zone2/type): $(echo "scale=2; $(cat /sys/devices/virtual/thermal/thermal_zone2/temp)/1000" |bc)°C"
echo "$(cat /sys/devices/virtual/thermal/thermal_zone3/type): $(echo "scale=2; $(cat /sys/devices/virtual/thermal/thermal_zone3/temp)/1000" |bc)°C"
echo "$(cat /sys/devices/virtual/thermal/thermal_zone5/type): $(echo "scale=2; $(cat /sys/devices/virtual/thermal/thermal_zone5/temp)/1000" |bc)°C"

CPU_temp=$(cat /sys/class/thermal/thermal_zone1/temp)
GPU_temp=$(cat /sys/class/thermal/thermal_zone2/temp)

cpu=$((CPU_temp/1000))
gpu=$((GPU_temp/1000))

echo "CPU $cpu°C"
echo "GPU $gpu°C"