Révision f110d3dd
verbose mode as runtime flag
| tools/munin-node-from-hell/muninnode-from-hell | ||
|---|---|---|
| 188 | 188 |
""" |
| 189 | 189 |
|
| 190 | 190 |
def handle(self): |
| 191 |
print "%s: Connection from %s:%s. server args is %s" \ |
|
| 191 |
if self.server.args.get("verbose"): print "%s: Connection from %s:%s. server args is %s" \
|
|
| 192 | 192 |
% (self.server.args["name"], self.client_address[0], self.client_address[1], self.server.args) |
| 193 | 193 |
# slow path |
| 194 | 194 |
hostname = self.server.args["name"] |
| ... | ... | |
| 264 | 264 |
|
| 265 | 265 |
|
| 266 | 266 |
def usage(): |
| 267 |
print "Usage: %s [--run] [--muninconf] <configfile>" % sys.argv[0] |
|
| 267 |
print "Usage: %s [--run] [--verbose] [--muninconf] <configfile>" % sys.argv[0]
|
|
| 268 | 268 |
|
| 269 | 269 |
def main(): |
| 270 | 270 |
if len(sys.argv) <= 2: |
| ... | ... | |
| 326 | 326 |
instanceconfig[k] = v |
| 327 | 327 |
|
| 328 | 328 |
instanceconfig["plugins"] = plugins |
| 329 |
if "--verbose" in sys.argv: |
|
| 330 |
instanceconfig["verbose"] = True |
|
| 329 | 331 |
|
| 330 | 332 |
instanceconfig["name"] = "%s-%s" % (instancename, portinstance) |
| 331 | 333 |
instanceconfig["expanded_port"] = portinstance |
Formats disponibles : Unified diff