package sysfs

import "github.com/prometheus/procfs/sysfs"

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

Index

Constants

const DefaultMountPoint = fs.DefaultSysMountPoint

DefaultMountPoint is the common mount point of the sys filesystem.

Types

type FS

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

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

func NewDefaultFS

func NewDefaultFS() (FS, error)

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

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) CPUVulnerabilities

func (fs FS) CPUVulnerabilities() ([]Vulnerability, error)

CPUVulnerabilities retrieves a map of vulnerability names to their mitigations.

type Vulnerability

type Vulnerability struct {
	CodeName   string
	State      string
	Mitigation string
}

Vulnerability represents a single vulnerability extracted from /sys/devices/system/cpu/vulnerabilities/

Source Files

doc.go fs.go vulnerability.go

Version
v0.0.6
Published
Nov 11, 2019
Platform
windows/amd64
Imports
5 packages
Last checked
52 minutes ago

Tools for package owners.