kubernetes: k8s.io/kubernetes/pkg/kubelet/stats Index | Files | Directories

package stats

import "k8s.io/kubernetes/pkg/kubelet/stats"

Index

Package Files

cadvisor_stats_provider.go cri_stats_provider.go cri_stats_provider_others.go helper.go log_metrics_provider.go stats_provider.go

type ByCreationTime Uses

type ByCreationTime []containerInfoWithCgroup

ByCreationTime implements sort.Interface for []containerInfoWithCgroup based on the cinfo.Spec.CreationTime field.

func (ByCreationTime) Len Uses

func (a ByCreationTime) Len() int

func (ByCreationTime) Less Uses

func (a ByCreationTime) Less(i, j int) bool

func (ByCreationTime) Swap Uses

func (a ByCreationTime) Swap(i, j int)

type LogMetricsService Uses

type LogMetricsService interface {
    // contains filtered or unexported methods
}

func NewLogMetricsService Uses

func NewLogMetricsService() LogMetricsService

type StatsProvider Uses

type StatsProvider struct {
    // contains filtered or unexported fields
}

StatsProvider provides the stats of the node and the pod-managed containers.

func NewCRIStatsProvider Uses

func NewCRIStatsProvider(
    cadvisor cadvisor.Interface,
    resourceAnalyzer stats.ResourceAnalyzer,
    podManager kubepod.Manager,
    runtimeCache kubecontainer.RuntimeCache,
    runtimeService internalapi.RuntimeService,
    imageService internalapi.ImageManagerService,
    logMetricsService LogMetricsService,
    osInterface kubecontainer.OSInterface,
) *StatsProvider

NewCRIStatsProvider returns a StatsProvider that provides the node stats from cAdvisor and the container stats from CRI.

func NewCadvisorStatsProvider Uses

func NewCadvisorStatsProvider(
    cadvisor cadvisor.Interface,
    resourceAnalyzer stats.ResourceAnalyzer,
    podManager kubepod.Manager,
    runtimeCache kubecontainer.RuntimeCache,
    imageService kubecontainer.ImageService,
    statusProvider status.PodStatusProvider,
) *StatsProvider

NewCadvisorStatsProvider returns a containerStatsProvider that provides both the node and the container stats from cAdvisor.

func (*StatsProvider) GetCgroupCPUAndMemoryStats Uses

func (p *StatsProvider) GetCgroupCPUAndMemoryStats(cgroupName string, updateStats bool) (*statsapi.ContainerStats, error)

GetCgroupCPUAndMemoryStats returns the CPU and memory stats of the cgroup with the cgroupName. Note that this function doesn't generate filesystem stats.

func (*StatsProvider) GetCgroupStats Uses

func (p *StatsProvider) GetCgroupStats(cgroupName string, updateStats bool) (*statsapi.ContainerStats, *statsapi.NetworkStats, error)

GetCgroupStats returns the stats of the cgroup with the cgroupName. Note that this function doesn't generate filesystem stats.

func (*StatsProvider) GetContainerInfo Uses

func (p *StatsProvider) GetContainerInfo(podFullName string, podUID types.UID, containerName string, req *cadvisorapiv1.ContainerInfoRequest) (*cadvisorapiv1.ContainerInfo, error)

GetContainerInfo returns stats (from cAdvisor) for a container.

func (*StatsProvider) GetRawContainerInfo Uses

func (p *StatsProvider) GetRawContainerInfo(containerName string, req *cadvisorapiv1.ContainerInfoRequest, subcontainers bool) (map[string]*cadvisorapiv1.ContainerInfo, error)

GetRawContainerInfo returns the stats (from cadvisor) for a non-Kubernetes container.

func (*StatsProvider) HasDedicatedImageFs Uses

func (p *StatsProvider) HasDedicatedImageFs() (bool, error)

HasDedicatedImageFs returns true if a dedicated image filesystem exists for storing images.

func (*StatsProvider) RlimitStats Uses

func (p *StatsProvider) RlimitStats() (*statsapi.RlimitStats, error)

RlimitStats returns base information about process count

func (*StatsProvider) RootFsStats Uses

func (p *StatsProvider) RootFsStats() (*statsapi.FsStats, error)

RootFsStats returns the stats of the node root filesystem.

Directories

PathSynopsis
pidlimit

Package stats imports 28 packages (graph) and is imported by 1 packages. Updated 2019-06-07. Refresh now. Tools for package owners.