github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/cmd/ipfs/diag.go (about) 1 package main 2 3 import ( 4 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag" 5 6 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander" 7 "github.com/jbenet/go-ipfs/core/commands" 8 ) 9 10 var cmdIpfsDiag = &commander.Command{ 11 UsageLine: "net-diag", 12 Short: "Generate a diagnostics report", 13 Long: `ipfs net-diag - Generate a diagnostics report. 14 15 Sends out a message to each node in the network recursively 16 requesting a listing of data about them including number of 17 connected peers and latencies between them. 18 `, 19 Run: diagCmd, 20 Flag: *flag.NewFlagSet("ipfs-net-diag", flag.ExitOnError), 21 } 22 23 func init() { 24 cmdIpfsDiag.Flag.Bool("raw", false, "print raw json output") 25 } 26 27 var diagCmd = makeCommand(command{ 28 name: "diag", 29 args: 0, 30 flags: []string{"raw"}, 31 cmdFn: commands.Diag, 32 })