Count memory stats in MB
This commit is contained in:
@@ -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."
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user