If your SSH connection drops unexpectedly after say, 4 hours, the job will be interrupted and you may have to restart from scratch. It is estimated that this job will require at least 8 hours. Furthermore, you can also reattach to such sessions, which lets you see previous output you may have missed in the terminal and reestablishes the ability to interact with the input of programs running there. The ability to keep a session running, even if the user disconnects from it, makes it very useful in some scenarios. Here's a picture of three Bash shells hosted in tmux:Īlthough it's called a multiplexer, tmux can do many other interesting things besides multiplexing terminals. With a terminal multiplexer you can avoid multiple logins, launching as many shell sessions as you need, in a single SSH session. You need to log in through SSH two times: in a window you open a resource monitoring application like "htop" and in another window you enter commands to perform the stress test. You want to see how your web server responds to stress tests.But practical examples are easier to understand than theory alone so let's explore a few use cases: Just like the operating system running on your phone or computer can execute and display, side by side, multiple applications on its graphical user interface, so can tmux do with text-based programs and shell sessions. However, in certain scenarios, you may need, or at least benefit, from expanding the capabilities of such a session with a terminal multiplexer like tmux. For most purposes, this simple setup suffices. Typically, you would connect to your server with an SSH client like PuTTY and after logging in you are dropped into a shell like Bash where you can enter commands and interact with the operating system. Tech Share is Alibaba Cloud's incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.Īs you manage Alibaba Cloud Elastic Compute Service (ECS) instances, you will often find yourself working at the command line in so-called pseudo-terminal sessions. By Alexandru Andrei, Alibaba Cloud Tech Share Author.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |