2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +00:00

(mds) new Maxilife tools from Fons R.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@791 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2000-04-15 17:26:58 +00:00
parent ce5c90df0b
commit 460b9b858d
2 changed files with 52 additions and 0 deletions

26
prog/maxilife/sysinfo.sh Normal file
View File

@@ -0,0 +1,26 @@
#! /bin/sh
lnxvers="`uname -s` `uname -r`"
#host="`hostname -s`"
host="`hostname`"
blink="o"
writelcd=/home/rdm/src/lm_sensors-2.5.0/prog/maxilife/writelcd.sh
$writelcd "$host" 3
i=0
while true; do
$writelcd "$lnxvers $blink" 2
if [ $[i == 5] = 1 ]; then
$writelcd "`awk '{ printf("%s %s %s", $1, $2, $3) }' < /proc/loadavg`" 4
i=0
fi
if [ $blink = "o" ]; then
blink=O
else
blink=o
fi
sleep 1
i=$[i+1]
done

26
prog/maxilife/writelcd.sh Normal file
View File

@@ -0,0 +1,26 @@
#! /bin/sh
usage() {
echo "usage: $0 <string> <line>"
echo " <string> must be <= 16 characters"
echo " <line> lcd line number, between 1..4"
}
if [ $# != 2 ]; then
usage
exit 1
fi
str=$1
line=$2
if [ $[line < 1 || line > 4] = 1 ]; then
usage
exit 1
fi
sysctl=/proc/sys/dev/sensors/maxilife-nba-i2c-0-14/lcd
printf "%-16.16s" "$str" | od -A n -l > $sysctl$line
exit 0