Changeset 418


Ignore:
Timestamp:
Nov 24, 2019, 10:17:36 PM (4 years ago)
Author:
g7moreau
Message:
  • Began doc in POD format
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tssh/tssh

    r417 r418  
    341341# Clean temporary folder
    342342[ -d "/tmp/${base_path}" ] && rm -rf "/tmp/${base_path}"
     343
     344
     345exit
     346
     347
     348################################################################
     349# Documentation in POD format (like Perl)
     350################################################################
     351
     352=head1 NAME
     353
     354tssh - tmux cluster ssh
     355
     356=head1 SYNOPSIS
     357
     358 tssh [-w number] [-f] [-v] [-p] [-c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+
     359
     360=head1 OPTIONS
     361
     362=over
     363
     364=item C<-w number>      windows to open (integer, default 16)
     365
     366=item C<-o ssh_option>  option to pass to ssh
     367
     368=item C<-f>             fast, no nmap scan to eliminate sleeping computer
     369
     370=item C<-v>             verbose
     371
     372=item C<-c remote_cmd>  launch the remote command on hosts and exit
     373
     374=item C<-p>             launch in parallel (only with option C<-c>) with command parallel or xargs
     375
     376=item  C<-h>             help
     377
     378=back
     379
     380=head1 DESCRIPTION
     381
     382tssh can be use to launch terminal on many computer in parallel with tmux
     383multiplexer and ssh.
     384The tmux windows is splitted automatically.
     385If you need more computers on the same windows, you can zoom in and out
     386under gnome terminal with Ctrl- or Ctrl+.
     387This must be done before launching tssh.
     388
     389On the command line, you can put C<host>, C<login@host>, C<clusterssh class>.
     390A host or a class can be remove from the list with a dash append
     391and force to be in this one with a plus append.
     392Example with the cluster ssh config below:
     393
     394 tssh all team- node005 laptop04+
     395
     396Is equivalent to:
     397
     398 tssh srv-mail srv-dns srv-imap srv-web srv-proxy \\
     399   node001 node002 node003 node004 \\
     400   node101 node102 node103 node104 \\
     401   node005 laptop04
     402
     403The control command for C<tmux> is C<Ctrl^b>.
     404You can switch from broadcast to a local machine with C<Ctrl^b Ctrl^b>
     405and move between machine with C<Ctrl^b ArrowKey>.
     406
     407=head1 DEPENDS
     408
     409On Debian, you need the package
     410
     411 apt-get install tmux ncurses-bin wamerican nmap
     412
     413C<wamerican> (or C<wfrench>...) is used to choose a random word in the file F</usr/share/dict/words>
     414for each new tmux session.
     415
     416C<ncurses-bin> is required for the C<tput> command
     417to automatically split your terminal into several small panels.
     418C<nmap> is only used for dynamic DNS domain and dynamic scan.
     419This is not mandatory for general use.
     420
     421By default, C<tssh> use C<tput> to know the number of columns and lines of your terminal.
     422It takes 10 lines and 40 columns for each windows by default.
     423If C<tput> is not installed, the default is 16 windows...
     424
     425=head1 CONFIGURATION
     426
     427The clusterssh config file F<~/.csshrc> is a key values file.
     428The "clusters" is mandatory for clusterssh (not tssh) and define the other keys.
     429Values could be computer list or other key...
     430
     431 clusters = all server s1 s2 s3 node n1 n2 team switch
     432 all = server node team
     433 server = s1 s2
     434 node = n1 n2
     435 s1 = srv-mail srv-dns srv-imap
     436 s2 = srv-web srv-proxy
     437 n1 = node001 node002 node003 node004
     438 n2 = node101 node102 node103 node104
     439 team = pc01 pc06 laptop04 laptop05 laptop09
     440 switch = root@switch01 root@switch05 root@switch17
     441
     442The C<tssh> config file (F<~/.tsshrc>) can be use change the default parameters.
     443
     444 #export split_number=16
     445 export dyn_domain='mycompagny.local'
     446 #export ssh_option=''
     447 #export fast='yes'
     448 #export verbose='yes'
     449
     450=head1 SEE ALSO
     451
     452cluster-ssh, cssh, xargs, parallel, tmux
     453
     454=head1 AUTHORS
     455
     456Written by Gabriel Moreau, Grenoble - France
     457
     458=head1 COPYRIGHT
     459
     460Copyright (C) 2014-2019, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
     461Licence : GNU GPL version 2 or later
Note: See TracChangeset for help on using the changeset viewer.