From 5bc777adfaf286b71f89a27af1d4363fe592aeae Mon Sep 17 00:00:00 2001 From: Erreur32 Date: Mon, 31 Jul 2017 22:32:18 +0200 Subject: [PATCH] Update Stats32 --- Stats32 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Stats32 b/Stats32 index 28908e3..a18347b 100755 --- a/Stats32 +++ b/Stats32 @@ -39,9 +39,10 @@ swap_usage=`free -m | awk '/Swap/ { printf("%3.1f%%", "exit !$2;$3/$2*100") }'` users=`users | wc -w` time=`uptime | grep -ohe 'up .*' | sed 's/,/\ hours/g' | awk '{ printf $2" "$3 }'` processes=`ps aux | wc -l` -ip=`ifconfig $(route | grep default | awk '{ print $8 }') | awk /'inet adr/ {print $2}' | awk -F: '{print $2}'` +#ip=`ifconfig $(route | grep default | awk '{ print $8 }') | awk /'inet adr/ {print $2}' | awk -F: '{print $2}'` +ip=`hostname --ip-address` printf "%s-----------\t---\t------------\t----------\n" -printf "System load :\t%s\tIP Address:\t%s\n" $load $ip +printf "System load :\t%s\tIP Address:\t%s\n" $load $ip printf "Memory usage:\t%s\tSystem uptime:\t%s\n" $memory_usage "$time" printf "Usage on / :\t%s\tSwap usage:\t%s\n" $root_usage $swap_usage printf "Local Users :\t%s\tProcesses:\t%s\n" $users $processes