Add 'mc admin' complete guide (#2456)

Fixes #2428
This commit is contained in:
Harshavardhana
2018-06-01 09:16:01 +05:30
committed by Nitish Tiwari
parent d566905d7a
commit 2d4346bfe1
8 changed files with 327 additions and 17 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Minio Client (C) 2017-2018 Minio, Inc.
* Minio Client (C) 2017, 2018 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ var adminHealFlags = []cli.Flag{
var adminHealCmd = cli.Command{
Name: "heal",
Usage: "Start an object heal operation",
Usage: "Heal disks, buckets and objects on Minio server",
Action: mainAdminHeal,
Before: setGlobalsFromContext,
Flags: append(adminHealFlags, globalFlags...),
+4 -4
View File
@@ -1,5 +1,5 @@
/*
* Minio Client (C) 2016,2017,2018 Minio, Inc.
* Minio Client (C) 2016, 2017, 2018 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ var (
var adminInfoCmd = cli.Command{
Name: "info",
Usage: "Get Minio server information",
Usage: "Display Minio server information",
Action: mainAdminInfo,
Before: setGlobalsFromContext,
Flags: append(adminInfoFlags, globalFlags...),
@@ -159,9 +159,9 @@ func (u infoMessage) String() (msg string) {
humanize.IBytes(u.ServerInfo.ConnStats.TotalInputBytes),
humanize.IBytes(u.ServerInfo.ConnStats.TotalOutputBytes))
// Get storage information
msg += fmt.Sprintf(" Storage : Used %s\n", humanize.IBytes(u.StorageInfo.Used))
msg += fmt.Sprintf(" Storage : Used %s", humanize.IBytes(u.StorageInfo.Used))
if v, ok := u.ServerInfo.StorageInfo.Backend.(xlBackend); ok {
msg += fmt.Sprintf(" Disks : %s, %s\n", console.Colorize("Info", v.OnlineDisks),
msg += fmt.Sprintf("\n Disks : %s, %s\n", console.Colorize("Info", v.OnlineDisks),
console.Colorize("InfoFail", v.OfflineDisks))
}
return
+2 -2
View File
@@ -28,7 +28,7 @@ import (
var adminServiceRestartCmd = cli.Command{
Name: "restart",
Usage: "Restart a minio server",
Usage: "Restart Minio server",
Action: mainAdminServiceRestart,
Before: setGlobalsFromContext,
Flags: globalFlags,
@@ -42,7 +42,7 @@ FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Restart a Minio server represented by its alias 'play'.
1. Restart Minio server represented by its alias 'play'.
$ {{.HelpName}} play/
`,
+1 -1
View File
@@ -34,7 +34,7 @@ var (
var adminServiceStatusCmd = cli.Command{
Name: "status",
Usage: "Get the status of a Minio server",
Usage: "Get the status of Minio server",
Action: mainAdminServiceStatus,
Before: setGlobalsFromContext,
Flags: append(adminServiceStatusFlags, globalFlags...),
+2 -2
View File
@@ -28,7 +28,7 @@ import (
var adminServiceStopCmd = cli.Command{
Name: "stop",
Usage: "Stop a minio server",
Usage: "Stop Minio server",
Action: mainAdminServiceStop,
Before: setGlobalsFromContext,
Flags: globalFlags,
@@ -42,7 +42,7 @@ FLAGS:
{{range .VisibleFlags}}{{.}}
{{end}}
EXAMPLES:
1. Stop a Minio server represented by its alias 'play'.
1. Stop Minio server represented by its alias 'play'.
$ {{.HelpName}} play/
`,
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Minio Client (C) 2016, 2017 Minio, Inc.
* Minio Client (C) 2016, 2017, 2018 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ import "github.com/minio/cli"
var adminServiceCmd = cli.Command{
Name: "service",
Usage: "Control servers",
Usage: "Stop, restart or get status of Minio server",
Action: mainAdminService,
Before: setGlobalsFromContext,
Flags: globalFlags,