ndenev / mpssh

Mass Parallel SSH
120 stars 21 forks source link

Fix usage() to show default values properly #4

Closed famzah closed 11 years ago

famzah commented 11 years ago

Hi,

I noticed you've hard-coded the "default 30sec" for the "Ssh connect timeout" in usage(), so I decided to make it reflect the actual default in a dynamic way -- by getting the value from the global variable.

Then I noticed that some default values weren't displayed in the usage(). All those have been added too.

I've got some more fixes to commit+merge later but first we need to discuss them:

  1. Let's set the default delay between each ssh fork to 10 msec? For 500 servers this slows down the whole process only with 5 seconds, but at the same time doesn't bombard your local machine with hundreds of fork()'s at once.
  2. The new "[ user@server ]" output is kinda uncomfortable for us (me, zImage, and the automated scripts at work) and we want the old behavior back :-) Furthermore, 99% of people are probably using mass SSH executions via a single username for all sessions. The questions:
    • Do we make the plain server-only output default and add an argument option to make it more verbose as it is now?
    • Or do we make an argument option to make it less verbose (and thus revert to the old server-only output)?
    • If you have any preference, provide the short and long argument name to use.
ndenev commented 11 years ago

good points.

Point 1 is already commited :)

Also I've just made it so that the username is displayed only under the verbose flag.