parent
1aa8383f29
commit
0083614a1a
@ -89,7 +89,7 @@ users=$(users | wc -w)
|
||||
swap_total=$(free -m | awk '/Swap/ { printf("%3.0f", $3/$2*100) }' | sed 's/ //g')
|
||||
swap_usage=${swap_usage//[!0-9]/} # to remove alfanumeric if swap not used
|
||||
swap_total=$(free -m | awk '/Swap/ {print $(2)}')
|
||||
ip_address=$(hostname -I | tail -1)
|
||||
ip_address=$(hostname -I | tr " " "\n" | grep -E "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" | tail -n2 | tr "\n" " ")
|
||||
root_usage=$(df -h / | awk '/\// {print $(NF-1)}' | sed 's/%//g')
|
||||
root_total=$(df -h / | awk '/\// {print $(NF-4)}')
|
||||
if [ -e "$storage" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user