Commit d1358607 authored by Peter Möller's avatar Peter Möller

Update host-monitor.sh

parent ee0a4d32
......@@ -14,12 +14,20 @@ OS="DSM $(egrep productversion /etc.defaults/VERSION | cut -d\" -f2)-$(egrep bui
# Kind of CPU (CPUModel='Intel® Atom™ CPU C2538 @ 2.40GHz'):
CPUModel="$(egrep "^model name" /proc/cpuinfo | sort -u | cut -d: -f2 | sed -e 's/^ //' -e 's/(R)/®/g' -e 's/(TM)/™/')"
if [ -z "$CPUModel" ]; then
CPUModel="$(egrep "^Processor" /proc/cpuinfo | sort -u | cut -d: -f2)"
fi
# Number of CPU:s (NbrCPUs=2):
NbrCPUs=$(egrep "^processor" /proc/cpuinfo | wc -l)
NbrCPUs=$(egrep -i "^processor" /proc/cpuinfo | wc -l)
# Size of memory [kB]
RAM=$(/sbin/dmidecode -t 17 | grep "Size.*MB" | awk '{s+=$2} END {print s * 1024}') # Ex: RAM=4194304
# Kind of memory (ECC='No ECC' or ECC='Multi-bit ECC'):
ECC="$(/sbin/dmidecode -t memory | egrep "Error Correction Type" | sort -u | cut -d: -f2 | sed -e 's/^ //' -e 's/None/No ECC/')"
if [ -x /sbin/dmidecode ]; then
RAM=$(/sbin/dmidecode -t 17 2>/dev/null | grep "Size.*MB" | awk '{s+=$2} END {print s * 1024}') # Ex: RAM=4194304
# Kind of memory (ECC='No ECC' or ECC='Multi-bit ECC'):
ECC="$(/sbin/dmidecode -t memory 2>/dev/null | egrep "Error Correction Type" | sort -u | cut -d: -f2 | sed -e 's/^ //' -e 's/None/No ECC/')"
else
RAM="$(egrep "^MemTotal:" /proc/meminfo | awk '{print $2}')"
ECC="No ECC"
fi
# What kind of authentication? Ex: Authentication=Lucat
if [ -n "$(egrep -v "#|^$" /etc/synoinfo.conf | egrep "uwdc[0-9]{1,2}.uw.lu.se")" -a -n "$(egrep "default_realm = UW.LU.SE" /etc/krb5.conf)" ]; then
Authentication="Lucat"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment