← Back to Upcase

Tmux: confusion over system processes and tmux sessions


(Jon Seidel) #1

I’ve been using tmux for quite a while, but @christoomey’s series really upped my game, and there’s still more for me to learn. Thanks, Chris!

However, now that I’m using more tmux sessions, I’m running into strange situations where system processes don’t match the active tmux sessions.

I found that I had two similar sessions open (Webpack & webpack-demo), so decided to close one of them. I did <C-S><C-Z> to close the current viewport, then did ps aux to see what processes were open. Here’s what I got (and I was able to copy/paste this using Martin Svangren’s excellent comment on the “Tmux 3 - Navigation” thread; thanks Martin!)

jseidel          57786   0.1  0.0  2501404   3348   ??  Ss   Sat08AM   0:24.18 tmux new-session -s Dev
jseidel          57986   0.0  0.0  2441568    240 s000  T    Sat08AM   0:00.01 tmux new-session -s Webpack
jseidel          57784   0.0  0.0  2466144      4 s000  T    Sat08AM   0:00.01 tmux new-session -s Dev
jseidel          24132   0.0  0.0  2466144   1412 s000  S+    6:56PM   0:00.01 tmux new-session -s webpack-demo

So I killed 24132 and 57986, plus the ‘extra’ Dev session 57784, and started a new tmux session called ‘webpackDemo’. Not sure that extra ‘Dev’ session got started, but I see that a lot.
Anyway, my ps output looks great now:

jseidel          57786   0.1  0.0  2501404   4820   ??  Ss   29Apr17   0:40.95 tmux new-session -s Dev
jseidel           4952   0.0  0.0  2447712    596 s008  S+    8:37AM   0:00.01 tmux new-session -s webpackDemo

but when I go back to my tmux session and type <C-S><C-J> to show my tmux sessions, I still see the old sessions plus the new one:

(0) + Dev: 1 windows
(1) + Webpack: 1 windows (attached)
(2) + webpack-demo: 1 windows
(3) + webpackDemo: 1 windows

What the heck am I doing wrong? My approach at this point will be to just terminate the whole ball of wax and start over, but I’d like to better understand what’s going on. Thanks!