mirror of
https://github.com/thewtex/tmux-mem-cpu-load.git
synced 2026-09-10 07:16:16 -04:00
10 lines
233 B
Bash
Executable file
10 lines
233 B
Bash
Executable file
#!/bin/sh
|
|
|
|
total_mem=$(/usr/bin/free -m | /usr/bin/awk '$1 == "Mem:" { print $2 }')
|
|
|
|
while(true); do
|
|
current_mem=$(/usr/bin/free -m | /usr/bin/awk '$1 == "-/+" { print $3 }')
|
|
echo "${current_mem}MB/${total_mem}MB"
|
|
sleep 3
|
|
done
|