Want to subscribe to topics you're interested in?
Become a Member

Sysadmin [Tutorial] tmux tutorial

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

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
  2. eva2000

    eva2000 Administrator Staff Member

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
    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

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
    Last edited: May 28, 2017
  4. eva2000

    eva2000 Administrator Staff Member

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
    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:
    5:46 AM
    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

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
    Yum install should be fine :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
    FYI, there's a web browser gui tmux pane/window generator tool too Cockpit
     
  8. eva2000

    eva2000 Administrator Staff Member

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
  9. eva2000

    eva2000 Administrator Staff Member

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
    Another tmux video

     
  10. pamamolf

    pamamolf Premium Member Premium Member

    4,067
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:46 AM
    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

    52,721
    12,073
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,599
    Local Time:
    12:46 PM
    Nginx 1.25.x
    MariaDB 10.x
    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