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:
parent
096fe787b7
commit
9b0597ca82
4 changed files with 16 additions and 16 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue