0

I have 5 node js scripts running, each in their own tmux session. I saw something completely unrelated a few days ago where someone was using tmux and they had like 6 different shells open on the same screen through tmux but I don't know what he was doing so maybe it's not what I think it is.

Is it possible for me to monitor all 5 of those sessions I created at the same time by putting them into a window like that? All I can find on google is how to create a new window but that doesn't directly answer my question.

I want a single view that will show me all 5 sessions at the same time so I don't need to attach to one at a time to see the current output.

EDIT: Workflow

TMUX session was created by doing tmux new-session -t app1 tmux new-session -t app2 tmux new-session -t app3 tmux new-session -t app4 tmux new-session -t app5

 

tmux attach-session -t app1

cd /srv/myapp1/

node express.js

CTRL+B CTRL+D

 

tmux attach-session -t app2

cd /srv/myapp2/

node express.js

CTRL+B CTRL+D

....And so on for all 5 apps.

I would prefer to create a single pane of my already existing sessions but I can restart them if needed. I want to view a single pane and see the output of all 5 sessions at once.

  • "6 different shells open on the same screen through tmux but I don't know what he was doing so" – Splitting a tmux window to multiple panes is one of the basic features. (1) So you have multiple tmux sessions (within one tmux server, right?), each with a single window with a single pane (right?) and you want to show them as one window, right? (2) Do you need this for already running sessions? or will you accept a solution for future use, where you create separate panes within one window, instead of separate sessions? (3) Or must (the) sessions stay separate? – Kamil Maciorowski Mar 04 '24 at 08:13
  • Please respond to the above by [edit]ing and clarifying the question. Do not respond in comments. – Kamil Maciorowski Mar 04 '24 at 08:16
  • Posting command(s) you use to run "5 node js scripts", "each in their own tmux session" may help. Show us your workflow, options you use and such. – Kamil Maciorowski Mar 04 '24 at 08:22
  • Updated my post – chickenchaser4343 Mar 04 '24 at 08:52
  • So you do it by hand, basically. In tmux experiment with Ctrl+b, ", Ctrl+b, %, Ctrl+b, {, Ctrl+b, }, Ctrl+b, arrows and Ctrl+b, z; are you familiar with them? Then it should be quite obvious how to run 5x node express.js in one tmux window anew. Do you need help in rearranging already running separate tmux sessions to a single tmux window? – Kamil Maciorowski Mar 04 '24 at 09:07

0 Answers0