From 59864bc2cbd4906d675d46c1694beaa426587e3f Mon Sep 17 00:00:00 2001 From: Will Russell Date: Fri, 17 May 2024 15:08:25 -0400 Subject: [PATCH] rebase with latest main Signed-off-by: Will Russell --- etcdctl/ctlv3/command/printer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etcdctl/ctlv3/command/printer.go b/etcdctl/ctlv3/command/printer.go index a7b9fb6a76e..75ee6324126 100644 --- a/etcdctl/ctlv3/command/printer.go +++ b/etcdctl/ctlv3/command/printer.go @@ -211,7 +211,7 @@ func makeEndpointHealthTable(healthList []epHealth) (hdr []string, rows [][]stri } func makeEndpointStatusTable(statusList []epStatus) (hdr []string, rows [][]string) { - hdr = []string{"endpoint", "ID", "version", "storage version", "db size", "db size in use", "is leader", "is learner", "raft term", + hdr = []string{"endpoint", "ID", "version", "storage version", "db size", "in use", "percentage not in use", "quota", "is leader", "is learner", "raft term", "raft index", "raft applied index", "errors"} for _, status := range statusList { rows = append(rows, []string{ @@ -221,6 +221,8 @@ func makeEndpointStatusTable(statusList []epStatus) (hdr []string, rows [][]stri status.Resp.StorageVersion, humanize.Bytes(uint64(status.Resp.DbSize)), humanize.Bytes(uint64(status.Resp.DbSizeInUse)), + fmt.Sprintf("%d%%", int(float64(100-(status.Resp.DbSizeInUse*100/status.Resp.DbSize)))), + humanize.Bytes(uint64(status.Resp.DbSizeQuota)), fmt.Sprint(status.Resp.Leader == status.Resp.Header.MemberId), fmt.Sprint(status.Resp.IsLearner), fmt.Sprint(status.Resp.RaftTerm),