Welcome to Centmin Mod Community
Register Now

Sysadmin [Tutorial] tmux tutorial

Discussion in 'System Administration' started by eva2000, May 28, 2017.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  2. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Starting to like tmux more than screen - works a bit better with my SecureCRT SSH client than screen (the backspace key maps to deleting entire line for me in screen sessions).

    Here I have tmux vertical split window with right window split again horizontally as tmux session name = s1. Where left window is show real time mysql process/queries, top right top output and bottom right show sar reported cpu load average over 1, 5 and 15min intervals.

    best part is if i exit SSH, i can come back to this exact configured window setup just attaching the tmux session named = s1 again

    tmux-280517.png

    Playing with webpagetests.org's API for scripted page speed analysis tests - left window for running my wpt.sh script, top right for editing wpt.sh, and bottom right for generated log files

    tmux-280517-wpt.png

    wpt-filmstrip-01.png
    wpt-filmstrip-02.png
    wpt-filmstrip-03.png
     
    Last edited: May 28, 2017
  3. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Last edited: May 28, 2017
  4. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    After increasing the scrollback buffer for tmux, the past 24hrs has been awesome and refreshing using tmux instead of screen ! Loving tmux :D
     
  5. Meirami

    Meirami Active Member

    154
    28
    28
    Dec 21, 2017
    Ratings:
    +63
    Local Time:
    3:36 PM
    Yum install tmux offers very old version. 1.8... Is it still ok or should I have newer? What is the recommended way to install newer?
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yum install should be fine :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    FYI, there's a web browser gui tmux pane/window generator tool too Cockpit
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  9. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Another tmux video

     
  10. pamamolf

    pamamolf Premium Member Premium Member

    4,074
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    3:36 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    What i really want is to send a command and be able to view the result on all servers at the same time without changing tabs :)

    20 servers for example :)

    I think Tmux can do that but i am looking for the easiest/best way to do it....

    If anyone can comment on it :)
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Most advanced why would be learning Ansible and setting it up on all servers.

    Or the way I do it is via my SSH client = SecureCRT https://community.centminmod.com/threads/how-do-you-manage-multiple-servers.16247/#post-69426 :D On my Dell 2723QE 4K monitor, I can easily send a single command to 20-40 servers at a time per SSH session group window that is tiled :D And as Centmin Mod default command prompt includes the server hostname in it, it's still easy to tell which window belongs to which server :)

    SecureCRT SSH client saves me time managing servers https://community.centminmod.com/th...load-nginx-php-upgrade-logs.19868/#post-84339 and https://community.centminmod.com/th...client-apps-do-you-use.390/page-10#post-90843 :D