1
0

Center hostname and show load average

This commit is contained in:
Arti Zirk 2023-09-24 15:59:59 +03:00
parent 50b89c1d4a
commit ef353ae999

View File

@ -32,12 +32,15 @@ netaddrs() {
) )
} }
msg -I 128x64 -c -i 0 -x 0 -y 0 -f 1 -l "`hostname`" title=`hostname`
msg -x0 -y 7 -l " <- X ->" 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 while true; do
netaddrs netaddrs
msg -f 0 -x 8 -y 6 -l "`date '+%Y-%m-%d %H:%M:%S'`" 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 sleep 1
done done