diff --git a/confluent_client/bin/noderun b/confluent_client/bin/noderun index 02e22eac..19d8f133 100755 --- a/confluent_client/bin/noderun +++ b/confluent_client/bin/noderun @@ -37,18 +37,20 @@ import confluent.client as client def run(): - concurrentprocs = 168 - # among other things, FD_SETSIZE limits. Besides, spawning too many - # processes can be unkind for the unaware on memory pressure and such... argparser = optparse.OptionParser( - usage="Usage: %prog node commandexpression", + usage="Usage: %prog noderange commandexpression", epilog="Expressions are the same as in attributes, e.g. " "'ipmitool -H {hardwaremanagement.manager}' will be expanded.") + argparser.add_option('-c', '--count', type='int', default=168, + help='Number of commands to run at a time') + # among other things, FD_SETSIZE limits. Besides, spawning too many + # processes can be unkind for the unaware on memory pressure and such... argparser.disable_interspersed_args() (options, args) = argparser.parse_args() if len(args) < 2: argparser.print_help() sys.exit(1) + concurrentprocs = options.count c = client.Command() cmdstr = " ".join(args[1:]) diff --git a/confluent_client/bin/nodeshell b/confluent_client/bin/nodeshell index 061bc869..6b8f6200 100755 --- a/confluent_client/bin/nodeshell +++ b/confluent_client/bin/nodeshell @@ -36,18 +36,21 @@ import confluent.client as client def run(): - concurrentprocs = 168 - # among other things, FD_SETSIZE limits. Besides, spawning too many - # processes can be unkind for the unaware on memory pressure and such... + argparser = optparse.OptionParser( - usage="Usage: %prog node commandexpression", + usage="Usage: %prog noderange commandexpression", epilog="Expressions are the same as in attributes, e.g. " "'ipmitool -H {hardwaremanagement.manager}' will be expanded.") + argparser.add_option('-c', '--count', type='int', default=168, + help='Number of commands to run at a time') + # among other things, FD_SETSIZE limits. Besides, spawning too many + # processes can be unkind for the unaware on memory pressure and such... argparser.disable_interspersed_args() (options, args) = argparser.parse_args() if len(args) < 2: argparser.print_help() sys.exit(1) + concurrentprocs = options.count c = client.Command() cmdstr = " ".join(args[1:])