Advertisement
mikelieman

bin/setup_dashboard.sh

Aug 29th, 2013
1,115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.92 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Create tmux session with 3 panes showing various status information for mosh-client to connect to
  4. # Invoke this on the remote machine with:
  5. #
  6. # $ mosh root@server.example.com -- /root/bin/setup_dashboard.sh
  7. #
  8. # and if you get disconnected, the mosh command:
  9. #
  10. # $ mosh root@server.example.com -- tmux attach
  11.  
  12. # tmux list-windows gives you this layout string, which is used to reset the panes
  13. LAYOUT="1cc2,157x66,0,0[157x26,0,0,0,157x39,0,27{79x39,0,27,1,77x39,80,27,2}]"
  14.  
  15. # quoting shell commands with tmux can be an issue, so we don't use shell variables
  16. /usr/local/bin/tmux new-session -d -s sysop -n dash '/usr/bin/less -WX +F /storage/www/server.example.com/application/log/development.log'
  17. /usr/local/bin/tmux split-window -t dash /usr/bin/dstat
  18. /usr/local/bin/tmux split-window -t dash -h /usr/bin/top
  19. /usr/local/bin/tmux select-layout -t dash $LAYOUT  
  20. /usr/local/bin/tmux attach-session -t sysop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement