summaryrefslogtreecommitdiff
path: root/cmd/dmap
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-03-04 16:32:27 +0000
committerPaul Buetow <pbuetow@mimecast.com>2020-03-04 16:32:27 +0000
commit238dd3930e9c58397a86f649c77912ee32e4d7f0 (patch)
treeb4cda0b8c677188b600478522471628b5d4efea4 /cmd/dmap
parent89d3ebfc4e0c947977e5f455ee76f3ce29cc92c7 (diff)
can tail probe with a given timeout and then write a mapreduce result
Diffstat (limited to 'cmd/dmap')
-rw-r--r--cmd/dmap/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/dmap/main.go b/cmd/dmap/main.go
index 07b7f2f..dea4706 100644
--- a/cmd/dmap/main.go
+++ b/cmd/dmap/main.go
@@ -27,6 +27,7 @@ func main() {
var serversStr string
var silentEnable bool
var sshPort int
+ var timeout int
var trustAllHosts bool
userName := user.Name()
@@ -38,6 +39,7 @@ func main() {
flag.BoolVar(&trustAllHosts, "trustAllHosts", false, "Auto trust all unknown host keys")
flag.IntVar(&connectionsPerCPU, "cpc", 10, "How many connections established per CPU core concurrently")
flag.IntVar(&sshPort, "port", 2222, "SSH server port")
+ flag.IntVar(&timeout, "timeout", 0, "Max time dtail server will collect data until disconnection")
flag.StringVar(&cfgFile, "cfg", "", "Config file path")
flag.StringVar(&discovery, "discovery", "", "Server discovery method")
flag.StringVar(&files, "files", "", "File(s) to read")
@@ -67,6 +69,7 @@ func main() {
What: files,
TrustAllHosts: trustAllHosts,
Mode: omode.MapClient,
+ Timeout: timeout,
}
client, err := clients.NewMaprClient(args, queryStr)