Quote:
Originally Posted by Xeratul
tmux ; ssh towhateverip top ; annd then I wanna get a lock of tmux
|
If you want
top to run once, then use the -n option.
Or if you want
tmux to run read-only then you can make a new, read-only client session:
Code:
tmux \
new-session -d -s Top \; \
rename-window -t Top:0 Monitoring \; \
split-window -t Top:Monitoring \; \
send-keys -t Top:Monitoring.0 'ssh whateverip1 "top"' C-m \; \
send-keys -t Top:Monitoring.1 'ssh whateverip2 "top"' C-m \; \
attach-session -t Top -f read-only
Note that -t read-only status is on the honor system. The same account (or other account if access is shared) can launch a new client with normal read-write permissions.