mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-12 15:48:51 +01:00
Revert "Replaced swap amount by CPU temperature in system_stats"
This reverts commit 658e99ca52e62958460376c67021ccd5a2f04031.
This commit is contained in:
parent
f5afdd0b5a
commit
748da2f4a7
@ -40,7 +40,7 @@ while true; do
|
|||||||
# Compute stats
|
# Compute stats
|
||||||
cpu=$(printf "%.0f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
|
cpu=$(printf "%.0f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
|
||||||
ram_mem=$(printf "%.0f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
|
ram_mem=$(printf "%.0f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
|
||||||
temp=$(printf "%.0f" $(printf "(%d*0.1)-144.7" $(i2cget -y -f 0 0x34 0x5E w|awk '{print "0x"substr($0,5,2)substr($0,4,1)}') | bc))
|
ram_swap=$(printf "%.0f\n" $(free | grep Swap | awk '{print $3/$2 * 100.0}'))
|
||||||
battery=$(printf "%.0f\n" $(cat /sys/class/power_supply/axp20x-battery/capacity))
|
battery=$(printf "%.0f\n" $(cat /sys/class/power_supply/axp20x-battery/capacity))
|
||||||
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
|
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ while true; do
|
|||||||
notif_dirty=0
|
notif_dirty=0
|
||||||
else
|
else
|
||||||
if [ "x${ip_addr}" != "x" ]; then
|
if [ "x${ip_addr}" != "x" ]; then
|
||||||
notif set 0 "CPU:${cpu} RAM:${ram_mem} TEMP:${temp} BAT:${battery}^IP:${ip_addr}"
|
notif set 0 "CPU:${cpu} RAM:${ram_mem} SWAP:${ram_swap} BAT:${battery}^IP:${ip_addr}"
|
||||||
else
|
else
|
||||||
notif set 0 "CPU:${cpu} RAM:${ram_mem} TEMP:${temp} BAT:${battery}"
|
notif set 0 "CPU:${cpu} RAM:${ram_mem} SWAP:${ram_swap} BAT:${battery}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
@ -40,7 +40,7 @@ while true; do
|
|||||||
# Compute stats
|
# Compute stats
|
||||||
cpu=$(printf "%.0f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
|
cpu=$(printf "%.0f\n" $(mpstat -P ALL $UPDATE_PERIOD 1 | tail -1 | awk '{print 100-$12}'))
|
||||||
ram_mem=$(printf "%.0f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
|
ram_mem=$(printf "%.0f\n" $(free | grep Mem | awk '{print $3/$2 * 100.0}'))
|
||||||
temp=$(printf "%.0f" $(printf "(%d*0.1)-144.7" $(i2cget -y -f 0 0x34 0x5E w|awk '{print "0x"substr($0,5,2)substr($0,4,1)}') | bc))
|
ram_swap=$(printf "%.0f\n" $(free | grep Swap | awk '{print $3/$2 * 100.0}'))
|
||||||
battery=$(printf "%.0f\n" $(cat /sys/class/power_supply/axp20x-battery/capacity))
|
battery=$(printf "%.0f\n" $(cat /sys/class/power_supply/axp20x-battery/capacity))
|
||||||
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
|
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ while true; do
|
|||||||
notif_dirty=0
|
notif_dirty=0
|
||||||
else
|
else
|
||||||
if [ "x${ip_addr}" != "x" ]; then
|
if [ "x${ip_addr}" != "x" ]; then
|
||||||
notif set 0 "CPU:${cpu} RAM:${ram_mem} TEMP:${temp} BAT:${battery}^IP:${ip_addr}"
|
notif set 0 "CPU:${cpu} RAM:${ram_mem} SWAP:${ram_swap} BAT:${battery}^IP:${ip_addr}"
|
||||||
else
|
else
|
||||||
notif set 0 "CPU:${cpu} RAM:${ram_mem} TEMP:${temp} BAT:${battery}"
|
notif set 0 "CPU:${cpu} RAM:${ram_mem} SWAP:${ram_swap} BAT:${battery}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user