Shows a list of sensor data from the server. Customize to taste
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.8KB

  1. #!/bin/bash
  2. ## Copyright © 2015 Bret Human
  3. ## https://cynicaloptimist.me/
  4. ##
  5. ## Documentation at:
  6. ## https://psi.cynicaloptimist.me/Caffarius/serverStatus
  7. ##
  8. ## For questions or comments write:
  9. ## info@cynicaloptimist.me
  10. # Set ZFS disk identifiers (found in /dev/disk/by-id/ - change these if a disk is replaced)
  11. diskZfs1=
  12. diskZfs2=
  13. diskZfs3=
  14. echo "Disk Tray Temperatures:"
  15. tempZfs1=`hddtemp /dev/disk/by-id/${diskZfs1} | cut -d":" -f3`
  16. tempZfs2=`hddtemp /dev/disk/by-id/${diskZfs2} | cut -d":" -f3`
  17. tempZfs3=`hddtemp /dev/disk/by-id/${diskZfs3} | cut -d":" -f3`
  18. echo -n "-+- Disk 1: "; echo ${tempZfs1}
  19. echo -n "-+- Disk 2: "; echo ${tempZfs2}
  20. echo -n "-+- Disk 3: "; echo ${tempZfs3}
  21. echo
  22. # Change k10temp-pci-00c3 to whatever your CPU is. You may need to change some cutting as well...
  23. echo "CPU Statistics:"
  24. infoCpu1=`sensors | grep -i -A2 k10temp-pci-00c3`
  25. tempCpu1=`echo "${infoCpu1}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
  26. echo -n "--- Temp1: "; echo -n ${tempCpu1}; echo " (Warning Temp: 70°C)"
  27. echo
  28. # Change amdgpu-pci-2300 to whatever your GPU is. You may need to change some cutting as well...
  29. echo "GPU1 Statistics:"
  30. infoGpu1=`sensors | grep -i -A3 'amdgpu-pci-2300'`
  31. fanGpu1=`echo "${infoGpu1}" | grep fan1 | cut -d":" -f2`
  32. tempGpu1=`echo "${infoGpu1}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
  33. echo -n "--- Temp1: "; echo -n ${tempGpu1}; echo " (Warning Temp: 70°C)"
  34. echo -n "--- Fan: "; echo ${fanGpu1}
  35. echo
  36. echo "Motherboard Statistics:"
  37. infoMobo1=`sensors | grep -i -A2 jc42-i2c-0-1a`
  38. infoMobo2=`sensors | grep -i -A2 jc42-i2c-0-1b`
  39. tempMobo1=`echo "${infoMobo1}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
  40. tempMobo2=`echo "${infoMobo2}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
  41. echo -n "--- Temp1: "; echo ${tempMobo1}
  42. echo -n "--- Temp2: "; echo ${tempMobo2}