Score:0

Why is my Ubuntu server running many tmux server processes?

th flag

I'm running Ubuntu 21.04 on a Raspberry Pi 4B. I'm viewing top to monitor what's going on and it is showing at the moment 11 'tmux: server' processes. Tmux is running, showing one window containing four panes. tmux ls is showing only one tmux session and I am the only user on this system.

Top is looking like this:

        PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 442735 forkbeard    20   0    2112     92      0 R  26.3   0.0 158:41.99 sh
 528026 forkbeard    20   0    9744   3284      0 R  26.3   0.0  20:52.28 tmux: server
 437265 forkbeard    20   0    9744   3284      0 R  24.7   0.0 173:13.35 tmux: server
 416513 forkbeard    20   0    2112     92      0 R  24.0   0.0 265:19.36 sh
 518289 forkbeard    20   0    2112     92      0 R  24.0   0.0  36:45.63 sh
 463927 forkbeard    20   0    9744   3284      0 R  23.7   0.0 118:41.86 tmux: server
 429208 forkbeard    20   0    9744   3284      0 R  23.4   0.0 206:13.66 tmux: server
 442671 forkbeard    20   0    9744   3284      0 R  23.4   0.0 158:40.05 tmux: server
 518605 forkbeard    20   0    9744   3284      0 R  23.4   0.0  36:02.78 tmux: server
 442526 forkbeard    20   0    9744   3284      0 R  23.1   0.0 159:29.68 tmux: server
 454131 forkbeard    20   0    2112     92      0 R  23.1   0.0 135:06.35 sh
 486599 forkbeard    20   0    9744   3284      0 R  23.1   0.0  81:16.72 tmux: server
 498747 forkbeard    20   0    9744   3284      0 R  23.1   0.0  62:09.51 tmux: server
 486415 forkbeard    20   0    9744   3284      0 R  22.8   0.0  81:28.65 tmux: server
 534318 root         20   0  398672  11260   1964 R  22.8   0.1  10:38.05 rsync
 528130 forkbeard    20   0    9744   3284      0 R  22.4   0.0  20:45.50 tmux: server

I have noticed this before on this machine and a reboot fixes it - but that's not a great solution. Killing the processes doesn't work, even as root; it doesn't give me an error but the process just keeps running.

If I'm listing the processes using ps I can also see the processes (first output line added for readability). What I find curious is the processes' start times: I am pretty sure I did not start any tmux sessions during the night.

root@rpi:/home/forkbeard# ps aux | grep [t]mux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
forkbeard    295509  0.6  0.0   9876  5984 ?        Ss   Aug12   7:45 tmux
forkbeard    429208 33.2  0.0   9744  3284 ?        R    Aug12 209:02 tmux
forkbeard    437265 30.6  0.0   9744  3284 ?        R    Aug12 176:00 tmux
forkbeard    442526 29.5  0.0   9744  3284 ?        R    Aug12 162:18 tmux
forkbeard    442671 29.4  0.0   9744  3284 ?        R    Aug12 161:28 tmux
forkbeard    463927 27.5  0.0   9744  3284 ?        R    Aug12 121:29 tmux
forkbeard    486415 25.1  0.0   9744  3284 ?        R    01:38  84:14 tmux
forkbeard    486599 25.1  0.0   9744  3284 ?        R    01:38  84:05 tmux
forkbeard    498747 24.1  0.0   9744  3284 ?        R    02:43  64:57 tmux
forkbeard    518605 22.4  0.0   9744  3284 ?        R    04:19  38:50 tmux
forkbeard    528026 21.4  0.0   9744  3284 ?        R    05:22  23:39 tmux
forkbeard    528130 21.4  0.0   9744  3284 ?        R    05:22  23:34 tmux
forkbeard    549554  0.0  0.0   7000  3072 pts/2    S+   07:10   0:00 tmux att

What's going on?

/edit:

pstree gives me this:

├─tmux: server─┬─bash───sudo───su───bash───watch
│              ├─bash───top
│              ├─bash───sudo───su───bash───pstree
│              ├─bash───sudo───su───bash───rsnapshot───rsync───rsync───rsync
│              ├─bash───sudo───su───bash
│              └─11*[tmux: server]
muru avatar
us flag
You might want to use `pstree` to inspect the parent and child processes of those `tmux` processes.
Forkbeard avatar
th flag
Added the pstree result
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.