ceph

package
v0.0.0-...-3b55481 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2024 License: MulanPSL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchDropCache

func BatchDropCache(mapWorker map[int64]*host_client.HostClient, osdNums []int64, threadNum int64) error

func GetAllIps

func GetAllIps(worker interfacer.Worker) ([]string, error)

func GetCephStatus

func GetCephStatus(worker interfacer.Worker) (ceph_cluster.CephStatus, error)

func GetDiskGroupByPoolName

func GetDiskGroupByPoolName(worker interfacer.Worker, poolName string) (string, error)

func GetOSDIp

func GetOSDIp(worker interfacer.Worker, osdNum int64) (string, error)

func GetOSDIpMap

func GetOSDIpMap(worker interfacer.Worker, osdNums []int64) (map[int64]string, error)

func GetOsdIDsByDiskGroupName

func GetOsdIDsByDiskGroupName(worker interfacer.Worker, diskGroupName string) ([]int64, error)

func GetOsdRecoveryMaxActive

func GetOsdRecoveryMaxActive(worker interfacer.Worker, osdNum int64) (int64, error)

func GetRecoveryLimit

func GetRecoveryLimit(worker interfacer.Worker, osdNum int64) (float64, error)

func ListCephStatus

func ListCephStatus(worker interfacer.Worker, runtime int64) (*ceph_cluster.CephStatusList, error)

Types

type CephConf

type CephConf struct {
	interfacer.Worker
	Ips                     []string                          `json:"ips"`
	HostClient              []host_client.HostClient          `json:"hostClient"`
	OsdNum                  []int64                           `json:"osdNum"`
	OsdNumMap               map[int64]*host_client.HostClient `json:"osdNumMap"`
	OsdNumReadLineMetaData  map[int64]line.LineMetaData       `json:"osdNumReadLineMetaData"`
	OsdNumWriteLineMetaData map[int64]line.LineMetaData       `json:"osdNumWriteLineMetaData"`
	ReadLineMetaData        line.LineMetaData                 `json:"readLineMetaData"`
	WriteLineMetaData       line.LineMetaData                 `json:"writeLineMetaData"`
}

func NewCephConf

func NewCephConf(worker interfacer.Worker, osdNums []int64) (*CephConf, error)

type JobCost

type JobCost struct {
	ExpectCost float64 `json:"expect_cost"`
	ActualCost float64 `json:"actual_cost(ms)"`
	Type       string  `json:"type"`
	Bytes      int64   `json:"bytes"`
}

根据磁盘组找到 osd

type JobCostList

type JobCostList []JobCost

func GetJobCostList

func GetJobCostList(worker interfacer.Worker, osdNum int64) (JobCostList, error)

ceph tell osd.0 dump_recent_ops_cost

func GetJobCostListByOsdNums

func GetJobCostListByOsdNums(worker interfacer.Worker, osdNums []int64, threadNum int64) (JobCostList, error)

func (JobCostList) AvgActualCost

func (list JobCostList) AvgActualCost() float64

func (JobCostList) AvgExpectCost

func (list JobCostList) AvgExpectCost() float64

func (JobCostList) BaseLineActualCost

func (list JobCostList) BaseLineActualCost() float64

func (JobCostList) TotalActualCost

func (list JobCostList) TotalActualCost() float64

func (JobCostList) TotalExpectCost

func (list JobCostList) TotalExpectCost() float64

type Node

type Node struct {
	ID       int64   `json:"id"`
	Name     string  `json:"name"`
	Type     string  `json:"type"`
	Children []int64 `json:"children"`
}

func GetSub

func GetSub(nodeID int64, nodeIDMap map[int64]Node) []Node

type OsdConfig

type OsdConfig struct {
	OsdID int64
	// contains filtered or unexported fields
}

func NewOsdConfig

func NewOsdConfig(worker interfacer.Worker, OsdID int64) *OsdConfig

func (*OsdConfig) Get

func (osdConfig *OsdConfig) Get(key string) (*OsdConfigResult, error)

func (*OsdConfig) GetAllConfig

func (osdConfig *OsdConfig) GetAllConfig() (*OsdConfigResult, error)

func (*OsdConfig) Set

func (osdConfig *OsdConfig) Set(key string, value string) error

type OsdConfigResult

type OsdConfigResult struct {
	KvMap map[string]string `json:"kvMap"`
}

func (*OsdConfigResult) FloatKey

func (confRes *OsdConfigResult) FloatKey(key string) float64

func (*OsdConfigResult) IntKey

func (confRes *OsdConfigResult) IntKey(key string) int64

func (*OsdConfigResult) RecoveryConfig

func (confRes *OsdConfigResult) RecoveryConfig() *OsdRecoveryConfig

type OsdRecoveryConfig

type OsdRecoveryConfig struct {
	OsdOpQueueMClockRecovLim  float64 `json:"osdOpQueueMClockRecovLim"`
	OsdRecoverySleep          float64 `json:"osdRecoverySleep"`
	OsdRecoveryMaxActive      int64   `json:"osdRecoveryMaxActive"`
	OsdMaxBackfills           int64   `json:"osdMaxBackfills"`
	OsdRecoveryMaxSingleStart int64   `json:"osdRecoveryMaxSingleStart"`
}

type OsdRecoveryConfigList

type OsdRecoveryConfigList []OsdRecoveryConfig

func (OsdRecoveryConfigList) Avg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL