Created
April 27, 2023 14:40
-
-
Save wpyoga/e863d0e7ef07aa1abed4eccd660fc0b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| lsmod | grep -qs drivetemp || sudo modprobe drivetemp | |
| echo SATA | |
| find /sys/devices -name vpd_pg89 | while read PG89; do | |
| dd if=$PG89 conv=swab status=none bs=1 count=40 skip=114 | |
| echo -n ' ' | |
| dd if=$PG89 conv=swab status=none bs=1 count=20 skip=80 | |
| echo -n ' ' | |
| sed -e 's,\([0-9]\)[0-9][0-9]$,.\1°C,' $(dirname $PG89)/hwmon/hwmon*/temp*_input | tr '\n' ' ' | |
| echo | |
| done | |
| echo | |
| echo NVMe | |
| find /sys/devices -name nvme | while read NVME; do | |
| for i in $NVME/*; do | |
| cat $i/model | |
| cat $i/serial | |
| cat $i/hwmon*/temp*_input | uniq | sed -e 's,\([0-9]\)[0-9][0-9]$,.\1°C,' | |
| done | tr '\n' ' ' | |
| echo | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment