meme

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: GPL-3.0 Imports: 4 Imported by: 1

README

meme

License Go Version Lines Release Stars Contributors

Get memory usage information in Go.

Currently Linux only.

Install and Use

In your project directory, type

go get github.com/alexcoder04/meme

And then, in your code

memData, err := meme.GetMemInfo()

The result comes in following type:

type MemData struct {
	Buffers      float64
	Cached       float64
	MemAvailable float64
	MemFree      float64
	MemTotal     float64
	Shared       float64
	Used         float64

	SwapFree  float64
	SwapTotal float64
	SwapUsed  float64
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemData

type MemData struct {
	Buffers      float64
	Cached       float64
	MemAvailable float64
	MemFree      float64
	MemTotal     float64
	Shared       float64
	Used         float64

	SwapFree  float64
	SwapTotal float64
	SwapUsed  float64
}

func GetMemInfo

func GetMemInfo() (MemData, error)

Jump to

Keyboard shortcuts

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