tmux sending commands to individual panes
So part of my job is to monitor may servers at once - check out my master plan, I am so close.
I split the terminal into twelve panes using tmux - and log into each one an tail the /var/log/messages in each pane.
hitting control -b o and typing ssh and tail -f into pane is getting tiring.
I have pushed the keys out so I can passwordless ssh to the servers.
I am just having trouble creating a script to automate my ssh logins and commands delivery - how do I issue the three commands to
tail -f /var/log/messages
each pane must ssh to a different server and tail that servers logs.
how do i issue commands to the individual panes in tmux?
Use the synchronise-panes option.
-- Thomas Adam
I kinda worked this out on my own.
This script will breakup the terminal into 8 seperate panes.
It sends a command to each pane via the send keys invocation.
You could just as easily send a tail -f /var/log/messages or a ssh casper@capser box or whatever.
mark my words - pretty soon you will all be using tmux - it is a productivity tool.
You have to open up a tmux session manually and then invoke the script.
|All times are GMT -5. The time now is 11:03 AM.|