code: func main() {
  	if len(os.Args) < 2 {
  		processes()
  		return
  	}
  
  	cmd := os.Args[1]
  
  	// See if it is a PID.
  	pid, err := strconv.Atoi(cmd)
  	if err == nil {
  		processInfo(pid)
  		return
  	}
  
  	if cmd == "help" {
  		usage("")
  	}
  
  	if cmd == "tree" {
  		displayProcessTree()
  		return
  	}
  
  	fn, ok := cmds[cmd]
  	if !ok {
  		usage("unknown subcommand")
  	}
  	if len(os.Args) < 3 {
  		usage("Missing PID or address.")
  		os.Exit(1)
  	}
  	addr, err := targetToAddr(os.Args[2])
  	if err != nil {
  		fmt.Fprintf(os.Stderr, "Couldn't resolve addr or pid %v to TCPAddress: %v\n", os.Args[2], err)
  		os.Exit(1)
  	}
  	var params []string
  	if len(os.Args) > 3 {
  		params = append(params, os.Args[3:]...)
  	}
  	if err := fn(*addr, params); err != nil {
  		fmt.Fprintf(os.Stderr, "%v\n", err)
  		os.Exit(1)
  	}
  }
docs: // TODO(jbd): add link that explains the use of agent.