@@ -115,29 +115,29 @@ func (mc *memoryCollector) collect() {
115
115
116
116
if mc .mBytesUsed != nil {
117
117
memUsed := meminfo .MemTotal - meminfo .MemFree - meminfo .Buffers - meminfo .Cached - meminfo .Slab
118
- mc .mBytesUsed .Record (map [string ]string {stateLabel : "free" }, int64 (meminfo .MemFree ))
119
- mc .mBytesUsed .Record (map [string ]string {stateLabel : "used" }, int64 (memUsed ))
120
- mc .mBytesUsed .Record (map [string ]string {stateLabel : "buffered" }, int64 (meminfo .Buffers ))
121
- mc .mBytesUsed .Record (map [string ]string {stateLabel : "cached" }, int64 (meminfo .Cached ))
122
- mc .mBytesUsed .Record (map [string ]string {stateLabel : "slab" }, int64 (meminfo .Slab ))
118
+ mc .mBytesUsed .Record (map [string ]string {stateLabel : "free" }, int64 (meminfo .MemFree )* 1024 )
119
+ mc .mBytesUsed .Record (map [string ]string {stateLabel : "used" }, int64 (memUsed )* 1024 )
120
+ mc .mBytesUsed .Record (map [string ]string {stateLabel : "buffered" }, int64 (meminfo .Buffers )* 1024 )
121
+ mc .mBytesUsed .Record (map [string ]string {stateLabel : "cached" }, int64 (meminfo .Cached )* 1024 )
122
+ mc .mBytesUsed .Record (map [string ]string {stateLabel : "slab" }, int64 (meminfo .Slab )* 1024 )
123
123
}
124
124
125
125
if mc .mDirtyUsed != nil {
126
- mc .mDirtyUsed .Record (map [string ]string {stateLabel : "dirty" }, int64 (meminfo .Dirty ))
127
- mc .mDirtyUsed .Record (map [string ]string {stateLabel : "writeback" }, int64 (meminfo .Writeback ))
126
+ mc .mDirtyUsed .Record (map [string ]string {stateLabel : "dirty" }, int64 (meminfo .Dirty )* 1024 )
127
+ mc .mDirtyUsed .Record (map [string ]string {stateLabel : "writeback" }, int64 (meminfo .Writeback )* 1024 )
128
128
}
129
129
130
130
if mc .mAnonymousUsed != nil {
131
- mc .mAnonymousUsed .Record (map [string ]string {stateLabel : "active" }, int64 (meminfo .ActiveAnon ))
132
- mc .mAnonymousUsed .Record (map [string ]string {stateLabel : "inactive" }, int64 (meminfo .InactiveAnon ))
131
+ mc .mAnonymousUsed .Record (map [string ]string {stateLabel : "active" }, int64 (meminfo .ActiveAnon )* 1024 )
132
+ mc .mAnonymousUsed .Record (map [string ]string {stateLabel : "inactive" }, int64 (meminfo .InactiveAnon )* 1024 )
133
133
}
134
134
135
135
if mc .mPageCacheUsed != nil {
136
- mc .mPageCacheUsed .Record (map [string ]string {stateLabel : "active" }, int64 (meminfo .ActiveFile ))
137
- mc .mPageCacheUsed .Record (map [string ]string {stateLabel : "inactive" }, int64 (meminfo .InactiveFile ))
136
+ mc .mPageCacheUsed .Record (map [string ]string {stateLabel : "active" }, int64 (meminfo .ActiveFile )* 1024 )
137
+ mc .mPageCacheUsed .Record (map [string ]string {stateLabel : "inactive" }, int64 (meminfo .InactiveFile )* 1024 )
138
138
}
139
139
140
140
if mc .mUnevictableUsed != nil {
141
- mc .mUnevictableUsed .Record (map [string ]string {}, int64 (meminfo .Unevictable ))
141
+ mc .mUnevictableUsed .Record (map [string ]string {}, int64 (meminfo .Unevictable )* 1024 )
142
142
}
143
143
}
0 commit comments