1
0
포크 0
serverStatus/status

49 lines
1.7 KiB
Bash

#!/bin/bash
## Copyright © 2015 Bret Human
## https://cynop.me/
##
## Documentation at:
## https://psi.cynop.me/Caffarius/serverStatus
##
## For questions or comments write:
## info@cynop.me
# Set ZFS disk identifiers (found in /dev/disk/by-id/ - change these if a disk is replaced)
diskZfs1=
diskZfs2=
diskZfs3=
echo "Disk Tray Temperatures:"
tempZfs1=`hddtemp /dev/disk/by-id/${diskZfs1} | cut -d":" -f3`
tempZfs2=`hddtemp /dev/disk/by-id/${diskZfs2} | cut -d":" -f3`
tempZfs3=`hddtemp /dev/disk/by-id/${diskZfs3} | cut -d":" -f3`
echo -n "-+- Disk 1: "; echo ${tempZfs1}
echo -n "-+- Disk 2: "; echo ${tempZfs2}
echo -n "-+- Disk 3: "; echo ${tempZfs3}
echo
# Change k10temp-pci-00c3 to whatever your CPU is. You may need to change some cutting as well...
echo "CPU Statistics:"
infoCpu1=`sensors | grep -i -A2 k10temp-pci-00c3`
tempCpu1=`echo "${infoCpu1}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
echo -n "--- Temp1: "; echo -n ${tempCpu1}; echo " (Warning Temp: 70°C)"
echo
# Change amdgpu-pci-2300 to whatever your GPU is. You may need to change some cutting as well...
echo "GPU1 Statistics:"
infoGpu1=`sensors | grep -i -A3 'amdgpu-pci-2300'`
fanGpu1=`echo "${infoGpu1}" | grep fan1 | cut -d":" -f2`
tempGpu1=`echo "${infoGpu1}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
echo -n "--- Temp1: "; echo -n ${tempGpu1}; echo " (Warning Temp: 70°C)"
echo -n "--- Fan: "; echo ${fanGpu1}
echo
echo "Motherboard Statistics:"
infoMobo1=`sensors | grep -i -A2 jc42-i2c-0-1a`
infoMobo2=`sensors | grep -i -A2 jc42-i2c-0-1b`
tempMobo1=`echo "${infoMobo1}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
tempMobo2=`echo "${infoMobo2}" | grep temp1 | cut -d"+" -f2 | cut -d"(" -f1`
echo -n "--- Temp1: "; echo ${tempMobo1}
echo -n "--- Temp2: "; echo ${tempMobo2}