table.AddRow("Max active processes:",pool.MaxActiveProcesses)
table.AddRow("Max children reached:",pool.MaxChildrenReached)
table.AddRow("Slow requests:",pool.SlowRequests)
table.AddRow("")
}
fmt.Println(table)
case"spew":
spew.Dump(pm)
default:
log.Error("Output format not valid.")
}
},
}
funcinit(){
RootCmd.AddCommand(getCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// getCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
getCmd.Flags().StringSliceVar(&scrapeURIs,"phpfpm.scrape-uri",[]string{"tcp://127.0.0.1:9000/status"},"FastCGI address, e.g. unix:///tmp/php.sock;/status or tcp://127.0.0.1:9000/status")
getCmd.Flags().StringVar(&output,"out","text","Output format. One of: text, json, spew")