linux

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LINUX_SYSINFO_LOADS_SCALE has been described elsewhere as a "magic" number.
	// It reverts the calculation of "load << (SI_LOAD_SHIFT - FSHIFT)" done in the original load calculation.
	LINUX_SYSINFO_LOADS_SCALE float64 = 65536.0
)

Constants

Variables

This section is empty.

Functions

func GetFacts

func GetFacts(cfg config.Config) *facts.Facts

Types

type BlockDevice

type BlockDevice struct {
	Device       string
	Size         uint64
	Vendor       string
	ReadIOs      uint64
	ReadMerges   uint64
	ReadSectors  uint64
	ReadTicks    uint64
	WriteIOs     uint64
	WriteMerges  uint64
	WriteSectors uint64
	WriteTicks   uint64
	InFlight     uint64
	IOTicks      uint64
	TimeInQueue  uint64
}

BlockDevice holds facts for a block device

type BlockDevices

type BlockDevices map[string]BlockDevice

BlockDevices holds the BlockDevice facts.

type DMI

type DMI struct {
	BIOSDate        string
	BIOSVendor      string
	BIOSVersion     string
	ChassisAssetTag string
	ChassisSerial   string
	ChassisType     string
	ChassisVendor   string
	ChassisVersion  string
	ProductName     string
	ProductSerial   string
	ProductUUID     string
	ProductVersion  string
	SysVendor       string
}

DMI holds the DMI / Hardware Information.

type Date

type Date struct {
	Unix     int64
	UTC      string
	Timezone string
	Offset   int
}

Date holds the date facts.

type FileSystem

type FileSystem struct {
	Device     string
	MountPoint string
	Type       string
	Options    []string
	DumpFreq   uint64
	PassNo     uint64
}

FileSystem holds facts for a filesystem (man fstab).

type FileSystems

type FileSystems map[string]FileSystem

FileSystems holds the Filesystem facts.

type Interface

type Interface struct {
	Name         string
	Index        int
	HardwareAddr string
	IpAddresses  []string
	Ip4Addresses []Ip4Address
	Ip6Addresses []Ip6Address
}

Interface holds facts for a single interface.

type Interfaces

type Interfaces map[string]Interface

Interfaces holds the interface facts.

type Ip4Address

type Ip4Address struct {
	CIDR    string
	Ip      string
	Netmask string
}

type Ip6Address

type Ip6Address struct {
	CIDR   string
	Ip     string
	Prefix int
}

type Kernel

type Kernel struct {
	Name    string
	Release string
	Version string
}

Kernel holds the kernel facts.

type LoadAverage

type LoadAverage struct {
	One  string
	Five string
	Ten  string
}

Holds the load average facts.

type Memory

type Memory struct {
	Total    uint64
	Free     uint64
	Shared   uint64
	Buffered uint64
}

Memory holds the memory facts.

type Network

type Network struct {
	Interfaces Interfaces
}

Network holds the network facts.

type OSRelease

type OSRelease struct {
	Name       string
	ID         string
	PrettyName string
	Version    string
	VersionID  string
	CodeName   string
}

OSRelease holds the OS release facts.

type Processor

type Processor struct {
	VendorID  string
	CPUFamily uint64
	Model     uint64
	ModelName string
	MHz       string
	CacheSize string
	CPUCores  uint64
	Flags     []string
	BogoMips  float64
}

Processor holds facts about a single Processor / CPU.

type Processors

type Processors struct {
	Count     int
	Processor []Processor
}

Processors holds facts about the Processors / CPUs.

type Swap

type Swap struct {
	Total uint64
	Free  uint64
}

Swap holds the swap facts.

type SystemFacts

type SystemFacts struct {
	Architecture string
	BootID       string
	DMI          DMI
	Date         Date
	Domainname   string
	Hostname     string
	Network      Network
	Kernel       Kernel
	MachineID    string
	Memory       Memory
	OSRelease    OSRelease
	Swap         Swap
	Uptime       int64
	LoadAverage  LoadAverage
	FileSystems  FileSystems
	BlockDevices BlockDevices
	Processors   Processors
	// contains filtered or unexported fields
}

SystemFacts holds the system facts.

Jump to

Keyboard shortcuts

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