Documentation ¶
Index ¶
- type Etc
- type Proc
- type Run
- type Sys
- func (*Sys) BIOSDate() string
- func (*Sys) BIOSVendor() string
- func (*Sys) BIOSVersion() string
- func (s *Sys) BlockSize(target string) int64
- func (*Sys) BoardName() string
- func (*Sys) BoardVendor() string
- func (s *Sys) CPUCoreList() []string
- func (s *Sys) CPUSocketMap() map[string]int
- func (*Sys) ChassisAssetTag() string
- func (*Sys) HypervisorType() string
- func (*Sys) HypervisorUUID() string
- func (s *Sys) ListBlock() []string
- func (s *Sys) ListCPU() []string
- func (s *Sys) ListNetwork() []string
- func (*Sys) ProductName() string
- func (*Sys) ProductSerial() string
- func (*Sys) ReadInt(target string) int
- func (*Sys) ReadInt64(target string) int64
- func (*Sys) ReadString(target string) string
- func (*Sys) SysVendor() string
- func (s *Sys) UEvent(target string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proc ¶
type Proc struct{}
Proc represents the /proc filesystem.
func (*Proc) MemInfo ¶
MemInfo read from /proc/meminfo, strip "kB" from endings and convert to int64.
type Run ¶
type Run struct{}
Run represents the /run filesystem.
func (*Run) ContainerEnv ¶
ContainerEnv bool if /run/.containerenv exists.
type Sys ¶
type Sys struct{}
Sys represents the /sys filesystem.
func (*Sys) BlockSize ¶
BlockSize reads from a size file for a storage device. The values return the number of blocks, so the value returned is multiplied by 512 to return the actual size.
func (*Sys) BoardVendor ¶
BoardVendor read from /sys/class/dmi/id/.
func (*Sys) CPUCoreList ¶
CPUCoreList returns a unique list of CPUs with the same physical core file returns a list of cores with the same physical core (e.g. 0, or 0,7).
func (*Sys) CPUSocketMap ¶
CPUSocketMap returns a map of CPU to Socket.
func (*Sys) ChassisAssetTag ¶
ChassisAssetTag read from /sys/class/dmi/id/.
func (*Sys) HypervisorType ¶
HypervisorType read from /sys/hypervisor/.
func (*Sys) HypervisorUUID ¶
HypervisorUUID read from /sys/hypervisor/.
func (*Sys) ListNetwork ¶
ListNetwork returns a list of all network devices in /sys.
func (*Sys) ProductName ¶
ProductName read from /sys/class/dmi/id/.
func (*Sys) ProductSerial ¶
ProductSerial read from /sys/class/dmi/id/.
func (*Sys) ReadString ¶
ReadString returns a string from a file.