2014-03-26 04:46:59 +08:00
|
|
|
package stats
|
|
|
|
|
2020-04-05 04:17:23 +08:00
|
|
|
import (
|
2022-07-29 15:17:28 +08:00
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
|
2020-04-05 04:17:23 +08:00
|
|
|
)
|
2014-03-26 04:46:59 +08:00
|
|
|
|
2018-10-16 13:25:28 +08:00
|
|
|
func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus) {
|
|
|
|
disk = &volume_server_pb.DiskStatus{Dir: path}
|
|
|
|
fillInDiskStatus(disk)
|
2020-08-02 02:15:52 +08:00
|
|
|
if disk.PercentUsed > 95 {
|
|
|
|
glog.V(0).Infof("disk status: %v", disk)
|
|
|
|
}
|
2014-03-26 04:46:59 +08:00
|
|
|
return
|
|
|
|
}
|