Files
dotfiles/linux/bin/tmux-mem-cpu-load

3 lines
163 B
Bash
Executable File

#!/usr/bin/env bash
top -bn1 | \
awk -F'[ \t,]+' '/^top -/{u=$(NF-6)" "$(NF-5);l=$(NF-2)" "$(NF-1)" "$(NF)};/^MiB Mem/{printf "%d/%d MB %s %s",$8,$4,u,l;exit 0}'