You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
420 B
24 lines
420 B
//go:build openbsd
|
|
// +build openbsd
|
|
|
|
package stats
|
|
|
|
import (
|
|
"syscall"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
|
|
)
|
|
|
|
func fillInDiskStatus(disk *volume_server_pb.DiskStatus) {
|
|
fs := syscall.Statfs_t{}
|
|
err := syscall.Statfs(disk.Dir, &fs)
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
disk.All = fs.F_blocks * uint64(fs.F_bsize)
|
|
disk.Free = fs.F_bfree * uint64(fs.F_bsize)
|
|
calculateDiskRemaining(disk)
|
|
|
|
return
|
|
}
|