sysfs

package
v0.0.0-...-282c870 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package sysfs provides functions to retrieve system and kernel metrics from the pseudo-filesystem sys.

Index

Constants

View Source
const DefaultMountPoint = "/sys"

DefaultMountPoint is the common mount point of the sys filesystem.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS string

FS represents the pseudo-filesystem sys, which provides an interface to kernel data structures.

func NewFS

func NewFS(mountPoint string) (FS, error)

NewFS returns a new FS mounted under the given mountPoint. It will error if the mount point can't be read.

func (FS) BcacheStats

func (fs FS) BcacheStats() ([]*bcache.Stats, error)

BcacheStats retrieves bcache runtime statistics for each bcache.

func (FS) Path

func (fs FS) Path(p ...string) string

Path returns the path of the given subsystem relative to the sys root.

func (FS) XFSStats

func (fs FS) XFSStats() ([]*xfs.Stats, error)

XFSStats retrieves XFS filesystem runtime statistics for each mounted XFS filesystem. Only available on kernel 4.4+. On older kernels, an empty slice of *xfs.Stats will be returned.

Jump to

Keyboard shortcuts

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