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 ConvertError(err error) 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 ConvertError ¶ added in v1.18.0
ConvertError converts a platform error into a commonerrors
func PlatformInformation ¶
PlatformInformation returns the platform information (equivalent to uname -s).
func SystemInformation ¶
SystemInformation returns the system information (equivalent to uname -a)
func UnixLineSeparator ¶ added in v1.1.0
func UnixLineSeparator() string
UnixLineSeparator returns the line separator on Unix platform.
Types ¶
type RAM ¶
type RAM interface { // GetTotal returns total amount of RAM on this system GetTotal() uint64 // GetAvailable returns RAM available for programs to allocate GetAvailable() uint64 // GetUsed returns RAM used by programs GetUsed() uint64 // GetUsedPercent returns Percentage of RAM used by programs GetUsedPercent() float64 // GetFree returns 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.