cadvisor: github.com/google/cadvisor/fs Index | Files

package fs

import "github.com/google/cadvisor/fs"

Provides Filesystem Stats

Index

Package Files

fs.go types.go

Constants

const (
    LabelSystemRoot          = "root"
    LabelDockerImages        = "docker-images"
    LabelCrioImages          = "crio-images"
    DriverStatusPoolName     = "Pool Name"
    DriverStatusDataLoopFile = "Data loop file"
)

Variables

var ErrNoSuchDevice = errors.New("cadvisor: no such device")

ErrNoSuchDevice is the error indicating the requested device does not exist.

type Context Uses

type Context struct {
    // docker root directory.
    Docker DockerContext
    Crio   CrioContext
}

type CrioContext Uses

type CrioContext struct {
    Root string
}

type DeviceInfo Uses

type DeviceInfo struct {
    Device string
    Major  uint
    Minor  uint
}

type DiskStats Uses

type DiskStats struct {
    MajorNum        uint64
    MinorNum        uint64
    ReadsCompleted  uint64
    ReadsMerged     uint64
    SectorsRead     uint64
    ReadTime        uint64
    WritesCompleted uint64
    WritesMerged    uint64
    SectorsWritten  uint64
    WriteTime       uint64
    IoInProgress    uint64
    IoTime          uint64
    WeightedIoTime  uint64
}

type DockerContext Uses

type DockerContext struct {
    Root         string
    Driver       string
    DriverStatus map[string]string
}

type Fs Uses

type Fs struct {
    DeviceInfo
    Type       FsType
    Capacity   uint64
    Free       uint64
    Available  uint64
    Inodes     *uint64
    InodesFree *uint64
    DiskStats  DiskStats
}

type FsInfo Uses

type FsInfo interface {
    // Returns capacity and free space, in bytes, of all the ext2, ext3, ext4 filesystems on the host.
    GetGlobalFsInfo() ([]Fs, error)

    // Returns capacity and free space, in bytes, of the set of mounts passed.
    GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, error)

    // GetDirUsage returns a usage information for 'dir'.
    GetDirUsage(dir string) (UsageInfo, error)

    // GetDeviceInfoByFsUUID returns the information of the device with the
    // specified filesystem uuid. If no such device exists, this function will
    // return the ErrNoSuchDevice error.
    GetDeviceInfoByFsUUID(uuid string) (*DeviceInfo, error)

    // Returns the block device info of the filesystem on which 'dir' resides.
    GetDirFsDevice(dir string) (*DeviceInfo, error)

    // Returns the device name associated with a particular label.
    GetDeviceForLabel(label string) (string, error)

    // Returns all labels associated with a particular device name.
    GetLabelsForDevice(device string) ([]string, error)

    // Returns the mountpoint associated with a particular device.
    GetMountpointForDevice(device string) (string, error)
}

func NewFsInfo Uses

func NewFsInfo(context Context) (FsInfo, error)

type FsType Uses

type FsType string
const (
    ZFS          FsType = "zfs"
    DeviceMapper FsType = "devicemapper"
    VFS          FsType = "vfs"
)

func (FsType) String Uses

func (ft FsType) String() string

type RealFsInfo Uses

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

func (*RealFsInfo) GetDeviceForLabel Uses

func (i *RealFsInfo) GetDeviceForLabel(label string) (string, error)

func (*RealFsInfo) GetDeviceInfoByFsUUID Uses

func (i *RealFsInfo) GetDeviceInfoByFsUUID(uuid string) (*DeviceInfo, error)

func (*RealFsInfo) GetDirFsDevice Uses

func (i *RealFsInfo) GetDirFsDevice(dir string) (*DeviceInfo, error)

func (*RealFsInfo) GetDirUsage Uses

func (i *RealFsInfo) GetDirUsage(dir string) (UsageInfo, error)

func (*RealFsInfo) GetFsInfoForPath Uses

func (i *RealFsInfo) GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, error)

func (*RealFsInfo) GetGlobalFsInfo Uses

func (i *RealFsInfo) GetGlobalFsInfo() ([]Fs, error)

func (*RealFsInfo) GetLabelsForDevice Uses

func (i *RealFsInfo) GetLabelsForDevice(device string) ([]string, error)

func (*RealFsInfo) GetMountpointForDevice Uses

func (i *RealFsInfo) GetMountpointForDevice(dev string) (string, error)

type UsageInfo Uses

type UsageInfo struct {
    Bytes  uint64
    Inodes uint64
}

func GetDirUsage Uses

func GetDirUsage(dir string) (UsageInfo, error)

Package fs imports 17 packages (graph) and is imported by 912 packages. Updated 2020-06-15. Refresh now. Tools for package owners.