Created
February 23, 2012 17:19
-
-
Save vjt/1893884 to your computer and use it in GitHub Desktop.
Web server tmux monitoring session
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/sh | |
# | |
# Starts a multiplexed terminal session with tmux running monitoring software. | |
# Requires dstat, htop and grc. The apache configuration for grc can be found | |
# here: https://gist.github.com/1885569 | |
# | |
# My .tmux.conf is here instead: https://gist.github.com/1886016#file_3_tmux.conf | |
# | |
# tmux 1.7 or later recommended. | |
# | |
name=monitor | |
if ! tmux has-session -t $name; then | |
tmux start \;\ | |
new-session -d -s $name exit \;\ | |
neww -n monitor 'grc tail -f /var/log/messages' \;\ | |
splitw -v -p 80 'tail -f /var/log/nginx/*.app-access.log | grcat conf.apache' \;\ | |
splitw -v -p 60 'dstat -cdgmnpy' \;\ | |
splitw -h -p 45 'htop' \; | |
fi | |
tmux attach -t monitor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment