https://github.com/alexcoder04/meme
Get memory usage information in Go
https://github.com/alexcoder04/meme
go go-library golang library linux meminfo memory memory-management memory-stats memory-usage
Last synced: 9 months ago
JSON representation
Get memory usage information in Go
- Host: GitHub
- URL: https://github.com/alexcoder04/meme
- Owner: alexcoder04
- License: gpl-3.0
- Created: 2022-10-17T11:49:57.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T21:03:21.000Z (9 months ago)
- Last Synced: 2025-04-02T22:19:53.987Z (9 months ago)
- Topics: go, go-library, golang, library, linux, meminfo, memory, memory-management, memory-stats, memory-usage
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# meme
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
```sh
go get github.com/alexcoder04/meme
```
And then, in your code
```go
memData, err := meme.GetMemInfo()
```
The result comes in following type:
```go
type MemData struct {
Buffers float64
Cached float64
MemAvailable float64
MemFree float64
MemTotal float64
Shared float64
Used float64
SwapFree float64
SwapTotal float64
SwapUsed float64
}
```