package sysfs

import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs"

Index

Types

type CacheInfo

type CacheInfo struct {
	// size in bytes
	Size uint64
	// cache type - instruction, data, unified
	Type string
	// distance from cpus in a multi-level hierarchy
	Level int
	// number of cpus that can access this cache.
	Cpus int
}

type SysFs

type SysFs interface {
	// Get directory information for available block devices.
	GetBlockDevices() ([]os.FileInfo, error)
	// Get Size of a given block device.
	GetBlockDeviceSize(string) (string, error)
	// Get scheduler type for the block device.
	GetBlockDeviceScheduler(string) (string, error)
	// Get device major:minor number string.
	GetBlockDeviceNumbers(string) (string, error)

	GetNetworkDevices() ([]os.FileInfo, error)
	GetNetworkAddress(string) (string, error)
	GetNetworkMtu(string) (string, error)
	GetNetworkSpeed(string) (string, error)
	GetNetworkStatValue(dev string, stat string) (uint64, error)

	// Get directory information for available caches accessible to given cpu.
	GetCaches(id int) ([]os.FileInfo, error)
	// Get information for a cache accessible from the given cpu.
	GetCacheInfo(cpu int, cache string) (CacheInfo, error)

	GetSystemUUID() (string, error)
}

Abstracts the lowest level calls to sysfs.

func NewRealSysFs

func NewRealSysFs() (SysFs, error)

Source Files

sysfs.go

Directories

PathSynopsis
Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs
Version
v0.13.2
Published
Mar 19, 2015
Platform
linux/amd64
Imports
6 packages
Last checked
5 minutes ago

Tools for package owners.