Skip to content

alexcoder04/meme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meme

License Go Version Lines Release Stars Contributors

Get memory usage information in Go. This library obtains and parses memory data from /proc/meminfo.

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
}