Center hostname and show load average
This commit is contained in:
parent
50b89c1d4a
commit
ef353ae999
@ -32,12 +32,15 @@ netaddrs() {
|
||||
)
|
||||
}
|
||||
|
||||
msg -I 128x64 -c -i 0 -x 0 -y 0 -f 1 -l "`hostname`"
|
||||
msg -x0 -y 7 -l " <- X ->"
|
||||
title=`hostname`
|
||||
COLUMNS=15
|
||||
text="`printf "%*s\n" $(((${#title}+$COLUMNS)/2)) "$title"`"
|
||||
msg -I 128x64 -c -i 0 -x 0 -y 0 -f 1 -l "$text"
|
||||
|
||||
|
||||
while true; do
|
||||
netaddrs
|
||||
msg -f 0 -x 8 -y 6 -l "`date '+%Y-%m-%d %H:%M:%S'`"
|
||||
msg -x0 -y7 -l "`cut -d" " -f1-3 /proc/loadavg`"
|
||||
sleep 1
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user