Documentation
¶
Overview ¶
* Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved. * SPDX-License-Identifier: Apache-2.0
Index ¶
- func BootTime() (bootime time.Time, err error)
- func Hostname() (string, error)
- func IsWindows() bool
- func LineSeparator() string
- func NodeName() (nodename string, err error)
- func PlatformInformation() (information string, err error)
- func SystemInformation() (information string, err error)
- func Uname() (string, error)
- func UnixLineSeparator() string
- func UpTime() (uptime time.Duration, err error)
- type RAM
- type VirtualMemory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlatformInformation ¶
Gets platform information (equivalent to uname -s).
func SystemInformation ¶
Gets system information (equivalent to uname -a)
func UnixLineSeparator ¶ added in v1.1.0
func UnixLineSeparator() string
Returns the line separator on Unix platform.
Types ¶
type RAM ¶
type RAM interface {
// Gets total amount of RAM on this system
GetTotal() uint64
//Gets RAM available for programs to allocate
GetAvailable() uint64
// Gets RAM used by programs
GetUsed() uint64
// Gets Percentage of RAM used by programs
GetUsedPercent() float64
// Gets kernel's notion of free memory
GetFree() uint64
}
type VirtualMemory ¶
type VirtualMemory struct {
Total uint64
Available uint64
Used uint64
UsedPercent float64
Free uint64
}
func (*VirtualMemory) GetAvailable ¶
func (m *VirtualMemory) GetAvailable() uint64
func (*VirtualMemory) GetFree ¶
func (m *VirtualMemory) GetFree() uint64
func (*VirtualMemory) GetTotal ¶
func (m *VirtualMemory) GetTotal() uint64
func (*VirtualMemory) GetUsed ¶
func (m *VirtualMemory) GetUsed() uint64
func (*VirtualMemory) GetUsedPercent ¶
func (m *VirtualMemory) GetUsedPercent() float64
Click to show internal directories.
Click to hide internal directories.