1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 10:16:57 +00:00

Those numbers are in kilobytes.

This commit is contained in:
Kane York 2015-11-17 11:11:14 -08:00
parent 096fe787b7
commit 9b0597ca82
4 changed files with 16 additions and 16 deletions

View file

@ -5,10 +5,10 @@ import (
"encoding/json"
"net/http"
"runtime"
"sync"
"time"
linuxproc "github.com/c9s/goprocinfo/linux"
"sync"
)
type StatsData struct {
@ -25,10 +25,10 @@ type StatsData struct {
PubSubChannelCount int
SysMemTotal uint64
SysMemFree uint64
MemoryInUse uint64
MemoryRSS uint64
SysMemTotalKB uint64
SysMemFreeKB uint64
MemoryInUse uint64
MemoryRSS uint64
MemoryPerClient uint64
@ -145,8 +145,8 @@ func updateSysMem() {
sysMemLastUpdate = time.Now()
memInfo, err := linuxproc.ReadMemInfo("/proc/meminfo")
if err == nil {
Statistics.SysMemTotal = memInfo.MemTotal
Statistics.SysMemFree = memInfo.MemAvailable
Statistics.SysMemTotalKB = memInfo.MemTotal
Statistics.SysMemFreeKB = memInfo.MemAvailable
}
}