initial commit
This commit is contained in:
commit
bd37341b44
|
@ -0,0 +1,51 @@
|
||||||
|
serverStatus
|
||||||
|
===
|
||||||
|
Copyright (c) 2015, Bret R. Human
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Further documentation can be found at
|
||||||
|
https://psi.cynicaloptimist.me/Caffarius/serverStatus/
|
||||||
|
Happy modding! -Bret
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
the documentation link and note, this list of conditions, and the following
|
||||||
|
disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. All advertising materials mentioning features or use of this
|
||||||
|
software must display the following acknowledgment:
|
||||||
|
"Built using software developed by Cynical Optimist - https://cynicaloptimist.me
|
||||||
|
Ask what we can build for you at info@cynicaloptimist.me"
|
||||||
|
|
||||||
|
4. The names "Cynical Optimist" and "Bret R. Human" and the software name listed
|
||||||
|
at the top of this document, or the domain "cynicaloptimist.me" or any
|
||||||
|
affiliated service must not be used to endorse or promote products derived
|
||||||
|
from this software without prior written permission. For written permission,
|
||||||
|
contact info@cynicaloptimist.me.
|
||||||
|
|
||||||
|
5. Products derived from this software may not be called the software name
|
||||||
|
listed at the top of this document nor may "Cynical Optimist" or the software
|
||||||
|
name listed at the top of this document appear in their names without prior
|
||||||
|
written permission of Bret R. Human.
|
||||||
|
|
||||||
|
6. Redistributions of any form whatsoever must retain the following
|
||||||
|
acknowledgment:
|
||||||
|
"Built using software developed by Cynical Optimist - https://cynicaloptimist.me
|
||||||
|
Ask what we can build for you at info@cynicaloptimist.me"
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,32 @@
|
||||||
|
serverStatus
|
||||||
|
=============================
|
||||||
|
Shows a list of sensor data from the server. To regenerate, do the following:
|
||||||
|
```
|
||||||
|
sudo wget -O /usr/bin/status https://psi.cynicaloptimist.me/Caffarius/serverStatus/raw/branch/master/status
|
||||||
|
sudo chmod 700 /usr/bin/status
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo /usr/bin/status
|
||||||
|
|
||||||
|
Disk Tray Temperatures:
|
||||||
|
-+- Disk 1: 32°C
|
||||||
|
--- Disk 2: empty
|
||||||
|
-+- Disk 3: 31°C
|
||||||
|
--- Disk 4: empty
|
||||||
|
-+- Disk 5: 32°C
|
||||||
|
|
||||||
|
CPU Statistics:
|
||||||
|
--- Temp1: 29.5°C (Warning Temp: 70°C)
|
||||||
|
|
||||||
|
GPU1 Statistics:
|
||||||
|
--- Temp1: 36.0°C (Warning Temp: 70°C)
|
||||||
|
--- Fan: 1410 RPM
|
||||||
|
|
||||||
|
Motherboard Statistics:
|
||||||
|
--- Temp1: 35.6°C
|
||||||
|
--- Temp2: 36.2°C
|
||||||
|
```
|
|
@ -0,0 +1,49 @@
|
||||||
|
#!/bin/bash
|
||||||
|
## Copyright © 2015 Bret Human
|
||||||
|
## https://cynicaloptimist.me/
|
||||||
|
##
|
||||||
|
## Documentation at:
|
||||||
|
## https://psi.cynicaloptimist.me/Caffarius/serverStatus
|
||||||
|
##
|
||||||
|
## For questions or comments write:
|
||||||
|
## info@cynicaloptimist.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}
|
Loading…
Reference in New Issue