mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Separate out memory statistics and system information into two different services
This commit is contained in:
11
commands.go
11
commands.go
@@ -101,7 +101,7 @@ func runController(c *cli.Context) {
|
||||
if err != nil {
|
||||
Fatalf("Unable to determine current user. Reason: %s\n", err)
|
||||
}
|
||||
if len(c.Args()) <= 2 || c.Args().First() == "help" {
|
||||
if len(c.Args()) < 2 || c.Args().First() == "help" {
|
||||
cli.ShowCommandHelpAndExit(c, "controller", 1) // last argument is exit code
|
||||
}
|
||||
switch c.Args().First() {
|
||||
@@ -117,7 +117,16 @@ func runController(c *cli.Context) {
|
||||
Fatalln(err)
|
||||
}
|
||||
Println(string(memstats))
|
||||
case "sysinfo":
|
||||
sysinfo, err := controller.GetSysInfo(c.Args().Tail().First())
|
||||
if err != nil {
|
||||
Fatalln(err)
|
||||
}
|
||||
Println(string(sysinfo))
|
||||
case "donut":
|
||||
if len(c.Args()) <= 2 || c.Args().First() == "help" {
|
||||
cli.ShowCommandHelpAndExit(c, "controller", 1) // last argument is exit code
|
||||
}
|
||||
hostname, _ := os.Hostname()
|
||||
err := controller.SetDonut(c.Args().Tail().First(), hostname, c.Args().Tail().Tail())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user