diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-09-06 16:35:27 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-09-06 16:35:27 (GMT) |
commit | 5669815ec3a539cf7b5ac7d8da2cbba3aeff44be (patch) | |
tree | f13051093a52f47f5954c2ee2a783bc2f0f62f96 /abs/core/xymon | |
parent | 8d35f28049488f2585ef765bf48e7a58958fd587 (diff) | |
parent | 04697136037cb5341ee6c051f8aaa265c0400c82 (diff) | |
download | linhes_pkgbuild-5669815ec3a539cf7b5ac7d8da2cbba3aeff44be.zip linhes_pkgbuild-5669815ec3a539cf7b5ac7d8da2cbba3aeff44be.tar.gz linhes_pkgbuild-5669815ec3a539cf7b5ac7d8da2cbba3aeff44be.tar.bz2 |
Merge branch 'testing'
Diffstat (limited to 'abs/core/xymon')
-rwxr-xr-x | abs/core/xymon/PKGBUILD | 11 | ||||
-rw-r--r-- | abs/core/xymon/logfetch.c.patch | 10 | ||||
-rw-r--r-- | abs/core/xymon/xymon-gputemp.sh | 24 | ||||
-rwxr-xr-x | abs/core/xymon/xymon-hddtemp.sh | 8 | ||||
-rwxr-xr-x | abs/core/xymon/xymon-smart.sh | 8 |
5 files changed, 44 insertions, 17 deletions
diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD index 759241b..76bf18d 100755 --- a/abs/core/xymon/PKGBUILD +++ b/abs/core/xymon/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=xymon pkgname=('xymonserver' 'xymonclient') pkgver=4.3.28 -pkgrel=5 +pkgrel=7 pkgdesc="Xymon is a system for monitoring of hosts and networks" license=('GPL') arch=('i686' 'x86_64') @@ -23,6 +23,7 @@ source=("https://downloads.sourceforge.net/project/xymon/Xymon/$pkgver/$pkgbase- 'hobbitstorage.py' 'hosts.cfg.patch' 'log_list.sh' + 'logfetch.c.patch' 'led_themes.tar.gz' 'login_notify.sh' 'logrotate-server.xymon' @@ -43,6 +44,7 @@ install=xymon-server.install build() { cd ${srcdir}/xymon-$pkgver + patch -p2 < $srcdir/logfetch.c.patch ENABLESSL=n \ ENABLELDAP=n \ ENABLELDAPSSL=n \ @@ -194,15 +196,16 @@ md5sums=('14501ab2cfce9a332c1590543dfcbd0f' 'b2f98ac0df013332deedc1efae0a270d' '606f535a49f32b35802ed9d46bd7d068' '98e9242ae346f729b14cb195786571f2' + '7d8689cc88ccca5bf7b2b454a909db72' 'c7178bbf384bbe86c318b60fef6faf10' '22d4c9065fd959efe82f121dcb511305' 'b4e8641e97e6b689dbc634af785e6799' 'e2844513e2c92e8b5084818f3b2a478d' 'a19c8c546dcd95049476bb19f9d4e3ae' 'c60b0d59bb39505ee3d62c6dd65429c5' - '6452d891d88bb46d07bcf7790a523ad0' - 'b49e7de696c1a0678ad198bab926266c' - 'e071c387deac6b896b20db19903b7794' + 'd4710f9aaa5aef0c9d0a26fa7d94450f' + 'c4e1575db32c633a531df9514d83aa82' + '281a5031824c8d98b4e541fed6da09ed' '1a00c0b9b9b1a37f1513fa8489ce9d31' '3d1f311f0142f41d763276302a7ce396' 'c75c434ba9c39a914e7693004b580554' diff --git a/abs/core/xymon/logfetch.c.patch b/abs/core/xymon/logfetch.c.patch new file mode 100644 index 0000000..bc61f00 --- /dev/null +++ b/abs/core/xymon/logfetch.c.patch @@ -0,0 +1,10 @@ +--- src/xymon-4.3.28/client/logfetch.c.orig 2018-04-17 23:05:45.429619941 +0000 ++++ src/xymon-4.3.28/client/logfetch.c 2018-04-17 23:07:34.895372581 +0000 +@@ -18,6 +18,7 @@ + #include <sys/stat.h> + #include <sys/time.h> + #include <stdio.h> ++#include <stdint.h> + #include <string.h> + #include <unistd.h> + #include <stdlib.h> diff --git a/abs/core/xymon/xymon-gputemp.sh b/abs/core/xymon/xymon-gputemp.sh index f8af649..db76f78 100644 --- a/abs/core/xymon/xymon-gputemp.sh +++ b/abs/core/xymon/xymon-gputemp.sh @@ -17,7 +17,10 @@ if ! test -x /usr/bin/nvidia-smi ; then fi # Use NVidia SMI to determine the model -gpu_model=`nvidia-smi -L` +#gpu_model=`nvidia-smi -L` +# Use lspci to determine the model +gpu_model=`lspci | grep -i vga | grep -vi non-vga| sort -r | head -n 1 | cut -d: -f3` + if test -z "$gpu_model" ; then $XYMON $XYMSRV "status $MACHINE.gputemp $gpu_color `date` Couldn't find nVidia card @@ -29,24 +32,27 @@ if test -z "$gpu_model" ; then fi # Determine GPU maximum temperature based on GPU model -if test $(echo $gpu_model | grep -c -i 'GeForce 210') -eq 0 ; then +if test $(echo $gpu_model | grep -c -i 'GeForce 210') -eq 1 ; then # GT 210 maximum GPU temperature is 105 C max_temp=105 -elif test $(echo $gpu_model | grep -c -i 'GeForce 220') -eq 0 ; then +elif test $(echo $gpu_model | grep -c -i 'GeForce 220') -eq 1 ; then # GT 220 maximum GPU temperature is 105 C max_temp=105 -elif test $(echo $gpu_model | grep -c -i 'GeForce 240') -eq 0 ; then +elif test $(echo $gpu_model | grep -c -i 'GeForce 240') -eq 1 ; then # GT 240 maximum GPU temperature is 105 C max_temp=105 -elif test $(echo $gpu_model | grep -c -i 'GeForce 430') -eq 0 ; then +elif test $(echo $gpu_model | grep -c -i 'GeForce 430') -eq 1 ; then # GT 430 maximum GPU temperature is 98 C max_temp=98 -elif test $(echo $gpu_model | grep -c -i 'GeForce GTS 450') -eq 0 ; then +elif test $(echo $gpu_model | grep -c -i 'GeForce GTS 450') -eq 1 ; then # GTS 450 maximum GPU temperature is 100 C max_temp=100 -elif test $(echo $gpu_model | grep -c -i 'GeForce GT 520') -eq 0 ; then +elif test $(echo $gpu_model | grep -c -i 'GeForce GT 520') -eq 1 ; then # GT 520 maximum GPU temperature is 102 C max_temp=102 +elif test $(echo $gpu_model | grep -c -i 'GeForce GT 710') -eq 1 ; then + # GT 710 maximum GPU temperature is 95 C + max_temp=95 else # Assume 100 is the maximum max_temp=100 @@ -72,8 +78,8 @@ if test -x /usr/bin/nvidia-smi ; then #`cat /tmp/gputemp.txt` #" $XYMON $XYMSRV "status $MACHINE.gputemp $gpu_color `date` - GPU model is $gpu_model - max temp is $max_temp + GPU Model -$gpu_model + GPU Max Temp (C) - $max_temp GPUTEMP : $gpu_temp " diff --git a/abs/core/xymon/xymon-hddtemp.sh b/abs/core/xymon/xymon-hddtemp.sh index 7084abc..0369b4a 100755 --- a/abs/core/xymon/xymon-hddtemp.sh +++ b/abs/core/xymon/xymon-hddtemp.sh @@ -2,7 +2,7 @@ # NOTE: Must be run as root, so you probably need to setup sudo for this. -ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' | +ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' -ve '/md' | while read DISK do DISKDEV=`ls -l $DISK | awk -F/ '{print $NF}'` @@ -17,7 +17,11 @@ do #check if device is mounted if ! mount | grep -q /dev/$DISKDEV then - continue + # check if device is used by mdadm + if ! cat /proc/mdstat | grep -q $DISKDEV + then + continue + fi fi #check if SMART is disabled and enable diff --git a/abs/core/xymon/xymon-smart.sh b/abs/core/xymon/xymon-smart.sh index 7c10db5..8998778 100755 --- a/abs/core/xymon/xymon-smart.sh +++ b/abs/core/xymon/xymon-smart.sh @@ -4,7 +4,7 @@ if test -f /tmp/dres; then rm -f /tmp/dres; fi -ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' | +ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' -ve '/md-' | while read DISK do DISKDEV=`ls -l $DISK | awk -F/ '{print $NF}'` @@ -18,7 +18,11 @@ do #check if device is mounted if ! mount | grep -q /dev/$DISKDEV then - continue + # check if device is used by mdadm + if ! cat /proc/mdstat | grep -q $DISKDEV + then + continue + fi fi DRES=`sudo /usr/bin/smartctl -H -n standby $DISK` |