diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-02-23 18:05:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-23 18:05:25 -0800 |
| commit | 346a1cf0b9b23529f064e75e91b87d198d2a6156 (patch) | |
| tree | 7cda25af786f42a6f77fe1ecffa39a950414fbd5 /weed/server | |
| parent | bbb163c5ad155e4fdd2ce2ea95a9c3788946df37 (diff) | |
| parent | 4ff513d64d1c9b94d7cb7cf342477f6bef19dd36 (diff) | |
| download | seaweedfs-346a1cf0b9b23529f064e75e91b87d198d2a6156.tar.xz seaweedfs-346a1cf0b9b23529f064e75e91b87d198d2a6156.zip | |
Merge pull request #1207 from LazyDBA247-Anyvision/update-stats-and-status-volume-server
Update stats and status volume server
Diffstat (limited to 'weed/server')
| -rw-r--r-- | weed/server/volume_server_handlers_admin.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/server/volume_server_handlers_admin.go b/weed/server/volume_server_handlers_admin.go index 1938a34c4..89bc051c5 100644 --- a/weed/server/volume_server_handlers_admin.go +++ b/weed/server/volume_server_handlers_admin.go @@ -12,6 +12,13 @@ import ( func (vs *VolumeServer) statusHandler(w http.ResponseWriter, r *http.Request) { m := make(map[string]interface{}) m["Version"] = util.VERSION + var ds []*volume_server_pb.DiskStatus + for _, loc := range vs.store.Locations { + if dir, e := filepath.Abs(loc.Directory); e == nil { + ds = append(ds, stats.NewDiskStatus(dir)) + } + } + m["DiskStatuses"] = ds m["Volumes"] = vs.store.VolumeInfos() writeJsonQuiet(w, r, http.StatusOK, m) } |
