docker

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockIOReadOp = iota + 1
	BlockIOWriteOp
)

Valid block I/O operations

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockIOOpStats

type BlockIOOpStats struct {
	Operation blockIOOp `json:"op"`
	Value     int       `json:"value"`
}

BlockIOOpStats represents cgroups stats for a block I/O operation type. The zero-value does not represent a valid value until the Operation is specified.

type CPUThrottlingStats

type CPUThrottlingStats struct {
	Periods int `json:"periods"`
	Time    int `json:"throttled_time"`
}

CPUThrottlingStats represents the cgroupd CPU throttling stats.

See https://docs.docker.com/config/containers/runmetrics/#metrics-from-cgroups-memory-cpu-block-io

type CPUUsageStats

type CPUUsageStats struct {
	Total  int `json:"total_usage"`
	Kernel int `json:"usage_in_kernelmode"`
	User   int `json:"usage_in_usermode"`
}

CPUThrottlingStats represents the cgroups CPU usage stats.

See https://docs.docker.com/config/containers/runmetrics/#metrics-from-cgroups-memory-cpu-block-io

type ContainerBlockIOStats

type ContainerBlockIOStats struct {
	ServiceBytes []BlockIOOpStats `json:"io_service_bytes_recursive"`
}

ContainerBlockIOStats represents the block I/O usage stats for a container.

See https://docs.docker.com/config/containers/runmetrics/#metrics-from-cgroups-memory-cpu-block-io

type ContainerCPUStats

type ContainerCPUStats struct {
	Usage      CPUUsageStats      `json:"cpu_usage"`
	Throttling CPUThrottlingStats `json:"throttling_data"`
	System     int                `json:"system_cpu_usage"`
	OnlineCPUs int                `json:"online_cpus"`
}

ContainerCPUStats represents the CPU usage stats for a container.

See https://docs.docker.com/config/containers/runmetrics/#metrics-from-cgroups-memory-cpu-block-io

type ContainerMemoryStats

type ContainerMemoryStats struct {
	Stats    MemoryStats `json:"stats"`
	MaxUsage int         `json:"max_usage"`
	Usage    int         `json:"usage"`
	Limit    int         `json:"limit"`
}

ContainerMemoryStats represents the memory usage stats for a container.

See https://docs.docker.com/config/containers/runmetrics/#metrics-from-cgroups-memory-cpu-block-io

type ContainerNetworkStats

type ContainerNetworkStats struct {
	RxBytes   int `json:"rx_bytes"`
	RxDropped int `json:"rx_dropped"`
	RxErrors  int `json:"rx_errors"`
	RxPackets int `json:"rx_packets"`
	TxBytes   int `json:"tx_bytes"`
	TxDropped int `json:"tx_dropped"`
	TxErrors  int `json:"tx_errors"`
	TxPackets int `json:"tx_packets"`
}

ContainerNetworkStats represents networking stats for a container.

See https://docs.docker.com/config/containers/runmetrics/#network-metrics

type ContainerStats

type ContainerStats struct {
	ReadAt   time.Time                        `json:"read"`
	Networks map[string]ContainerNetworkStats `json:"networks"`
	Memory   ContainerMemoryStats             `json:"memory_stats"`
	BlockIO  ContainerBlockIOStats            `json:"blkio_stats"`
	CPU      ContainerCPUStats                `json:"cpu_stats"`
}

ContainerStats represents the container resource usage stats as returned by Docker Engine.

See https://docs.docker.com/engine/api/v1.30/#operation/ContainerExport

type MemoryStats

type MemoryStats struct {
	ActiveAnon   int `json:"active_anon"`
	ActiveFile   int `json:"active_file"`
	InactiveAnon int `json:"inactive_anon"`
	InactiveFile int `json:"inactive_file"`
	TotalRss     int `json:"total_rss"`
	TotalCache   int `json:"total_cache"`
}

MemoryStats represents the cgroups memory stats.

See https://docs.docker.com/config/containers/runmetrics/#metrics-from-cgroups-memory-cpu-block-io

Jump to

Keyboard shortcuts

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