Created
May 30, 2015 18:04
-
-
Save vampjaz/4a33b04692501d334f98 to your computer and use it in GitHub Desktop.
Tmux Server monitoring script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SESSION=$USER | |
# requires tmux, speedometer, htop | |
# speedometer = network graphs | |
# htop = better cpu usage | |
# btcwatch.sh and dogewatch.sh simply call ./<coin>-cli getinfo every 30 seconds | |
# leaves a pane open to shell | |
# borrowed some code from http://blog.htbaa.com/news/tmux-scripting | |
tmux -2 new-session -d -s $SESSION | |
tmux new-window -t $SESSION:1 -n 'Management' | |
tmux split-window -h | |
tmux select-pane -t 0 | |
tmux split-window -v | |
tmux select-pane -t 0 | |
tmux send-keys "speedometer -r eth0 -t eth0" C-m | |
tmux select-pane -t 1 | |
tmux send-keys "htop" C-m | |
tmux select-pane -t 2 | |
tmux split-window -v | |
tmux select-pane -t 2 | |
tmux split-window -h | |
tmux select-pane -t 2 | |
tmux send-keys "sh ./btcwatch.sh" C-m | |
tmux select-pane -t 3 | |
tmux send-keys "sh ./dogewatch.sh" C-m | |
tmux select-pane -t 4 | |
tmux select-window -t $SESSION:1 | |
tmux -2 attach-session -t $SESSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment