Count memory stats in MB

This commit is contained in:
2021-02-15 15:09:17 +01:00
parent 1572d44f89
commit ce7bc467e8

View File

@@ -173,9 +173,9 @@ stat(){
admin
total=$(grep MemTotal /proc/meminfo | awk '{print $2}')
avail=$(grep MemAvailable /proc/meminfo | awk '{print $2}')
used=$(bc <<< "$total-$avail")
used=$(bc <<< "scale=1; ($total-$avail) / 1024")
sendmsg "$(uptime | cut -c2-)
I am using ${used}K of memory and \
I am using ${used}M of memory and \
$(df -h / | tail -n1 | awk '{print $3}') of storage."
}