#gotmux-mem-cpu
CPU and RAM monitor for use with tmux
Simple CPU and RAM monitor, written on golang. CPU utilization shows in percent over all cores.
5375/7859MB ▆ 27.2% ▃
^ ^ ^ ^ ^
| | | | |
1 2 3 4 5
- Currently used memory.
- Total memory.
- RAM usage bar graph, <50% - green, >50% - yellow, >75% - red.
- CPU utilization, default for 2sec.
- CPU usage bar graph, same as RAM.
- >= golang 1.0
The link to source code of monitor.
go get -u github.com/Spirans/gotmux-mem-cpu
go install github.com/Spirans/gotmux-mem-cpu
or
cd <source dir>
go build gotmux-mem-cpu.go
sudo cp gotmux-mem-cpu /usr/local/bin
or
download gotmux-mem-cpu for your architecture from the repository and put it in the directory, which is in the $PATH
➜ gotmux-mem-cpu -h
Usage of gotmux-mem-cpu:
-b string
Background color for cpu and mem status bar (default "black")
-f string
Foreground color for cpu and mem status bar (default "white")
-i int
Interval in seconds for calculating CPU utilization (default 2)
Edit $HOME/.tmux.conf and add for left or right side of status bar:
set -g status-interval 2
set -g status-right "#(gotmux-mem-cpu)"
Note: status-interval must be the same like interval for gotmux-mem-cpu (2sec by default)
Veniamin Stepanov <[email protected]>