File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ type Meminfo struct {
126
126
VmallocUsed * uint64
127
127
// largest contiguous block of vmalloc area which is free
128
128
VmallocChunk * uint64
129
+ Percpu * uint64
129
130
HardwareCorrupted * uint64
130
131
AnonHugePages * uint64
131
132
ShmemHugePages * uint64
@@ -178,6 +179,7 @@ type Meminfo struct {
178
179
VmallocTotalBytes * uint64
179
180
VmallocUsedBytes * uint64
180
181
VmallocChunkBytes * uint64
182
+ PercpuBytes * uint64
181
183
HardwareCorruptedBytes * uint64
182
184
AnonHugePagesBytes * uint64
183
185
ShmemHugePagesBytes * uint64
@@ -339,6 +341,9 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) {
339
341
case "VmallocChunk:" :
340
342
m .VmallocChunk = & val
341
343
m .VmallocChunkBytes = & valBytes
344
+ case "Percpu:" :
345
+ m .Percpu = & val
346
+ m .PercpuBytes = & valBytes
342
347
case "HardwareCorrupted:" :
343
348
m .HardwareCorrupted = & val
344
349
m .HardwareCorruptedBytes = & valBytes
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ func TestMeminfo(t *testing.T) {
53
53
VmallocTotal : newuint64 (34359738367 ),
54
54
VmallocUsed : newuint64 (36596 ),
55
55
VmallocChunk : newuint64 (34359637840 ),
56
+ Percpu : newuint64 (26176 ),
56
57
HardwareCorrupted : newuint64 (0 ),
57
58
AnonHugePages : newuint64 (12288 ),
58
59
HugePagesTotal : newuint64 (0 ),
@@ -96,6 +97,7 @@ func TestMeminfo(t *testing.T) {
96
97
VmallocTotalBytes : newuint64 (35184372087808 ),
97
98
VmallocUsedBytes : newuint64 (37474304 ),
98
99
VmallocChunkBytes : newuint64 (35184269148160 ),
100
+ PercpuBytes : newuint64 (26804224 ),
99
101
HardwareCorruptedBytes : newuint64 (0 ),
100
102
AnonHugePagesBytes : newuint64 (12582912 ),
101
103
HugepagesizeBytes : newuint64 (2097152 ),
Original file line number Diff line number Diff line change @@ -2317,7 +2317,7 @@ unused devices: <none>
2317
2317
Mode: 644
2318
2318
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2319
2319
Path: fixtures/proc/meminfo
2320
- Lines: 42
2320
+ Lines: 43
2321
2321
MemTotal: 15666184 kB
2322
2322
MemFree: 440324 kB
2323
2323
Buffers: 1020128 kB
@@ -2351,6 +2351,7 @@ Committed_AS: 530844 kB
2351
2351
VmallocTotal: 34359738367 kB
2352
2352
VmallocUsed: 36596 kB
2353
2353
VmallocChunk: 34359637840 kB
2354
+ Percpu: 26176 kB
2354
2355
HardwareCorrupted: 0 kB
2355
2356
AnonHugePages: 12288 kB
2356
2357
HugePages_Total: 0
You can’t perform that action at this time.
0 commit comments