Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| monitor:multipane [2021/02/20 11:11] – [Unix - Actively Monitor Multiple Logs] - add tmux and lnav links .. generally fuck up the wiki with mis-information :-P mortifis | monitor:multipane [2021/02/24 12:49] (current) – [Advanced tmux example] more relevant image mortifis | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| You should now have 3 panes, each monitoring one aspect of you Synchronet BBS activity. | You should now have 3 panes, each monitoring one aspect of you Synchronet BBS activity. | ||
| - | == poor quality | + | == example |
| + | |||
| + | {{: | ||
| + | |||
| + | ===== Advanced tmux example ===== | ||
| + | |||
| + | In this example, we create a bash script that sets tmux up for us and automatically launches a few goodies: | ||
| + | me@localhost: | ||
| + | |||
| + | # | ||
| + | # sbbsMux - SBBS Monitoring script | ||
| + | tmux new-session -d -s sess >/ | ||
| + | tmux rename-window -t sess:0 ' | ||
| + | tmux splitw -v -p 20 -t sess:0.0 | ||
| + | tmux splitw -h -p 80 -t sess:0.1 | ||
| + | #required; otherwise pane numbering is bs | ||
| + | tmux select-pane -t sess:0.0 | ||
| + | tmux splitw -h -p 5 -t sess:0.0 | ||
| + | tmux send-keys -t sess:0.0 ' | ||
| + | tmux send-keys -t sess: | ||
| + | tmux send-keys -t sess:0.1 '/ | ||
| + | tmux select-pane -t sess:0.0 | ||
| + | tmux new-window -t sess | ||
| + | tmux rename-window -t sess:1 ' | ||
| + | tmux splitw -v -p 10 -t sess:1.0 | ||
| + | tmux splitw -h -p 80 -t sess:1.1 | ||
| + | tmux select-pane -t sess:1.0 | ||
| + | tmux splitw -h -p 10 -t sess:1.0 | ||
| + | tmux clock -t sess:1.1 | ||
| + | tmux new-window -t sess | ||
| + | tmux rename-window -t sess:2 ' | ||
| + | tmux splitw -v -p 10 -t sess:2.0 | ||
| + | tmux send-key -t sess:2.0 'lnav / | ||
| + | tmux select-pane -t sess:2.0 | ||
| + | tmux splitw -h -p 5 -t sess:2.0 | ||
| + | tmux clock -t sess:2.1 | ||
| + | tmux select-window -t sess:0.0 | ||
| + | tmux a -t sess | ||
| + | |||
| + | ** note Edit 'tmux rename-window -t sess:x ' | ||
| + | |||
| + | Save this as sbbsmux (or whatever) and chmod +x and launch it | ||
| + | |||
| + | someone@somewhere: | ||
| + | |||
| + | The output should look similar to: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Navigate to the pane with the prompt, this was left available to preforming tasks. | ||
| + | |||
| + | me@mynixbox: | ||
| + | |||
| + | Now we should see something similar to: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | |||
| - | {{: | ||
| ===== See Also ===== | ===== See Also ===== | ||