@@ -319,7 +319,8 @@ def _meminfo(self):
319
319
'_RAW' , '_TOTAL' , '_COMMITED' , '_COMMITEDLIMIT' ,
320
320
'_FREE' , '_SWAPUSED' , '_SLAB'
321
321
'_SWAPTOTAL' , '_CACHED' , '_DIRTY' , '_BUFFERS' ,
322
- '_HUGEPAGES' , '_SHMEM' , '_PAGETABLES' ]:
322
+ '_HUGEPAGES_SIZE' , '_HUGEPAGES_FREE' ,
323
+ '_SHMEM' , '_PAGETABLES' ]:
323
324
result [key ] = NA
324
325
325
326
if self .is_empty (data ):
@@ -328,6 +329,8 @@ def _meminfo(self):
328
329
result ['_RAW' ] = data
329
330
for info in re .findall (r'^(\S+)\:\s+(\d+)\s+kB$' , data , re .M ):
330
331
result [info [0 ]] = int (info [1 ]) * 1024
332
+ for info in re .findall (r'^(\S+)\:\s+(\d+)$' , data , re .M ):
333
+ result [info [0 ]] = int (info [1 ])
331
334
if 'MemTotal' in result :
332
335
result ['_TOTAL' ] = result ['MemTotal' ]
333
336
if 'CommitLimit' in result :
@@ -340,8 +343,11 @@ def _meminfo(self):
340
343
result ['_SWAPTOTAL' ] = result ['SwapTotal' ]
341
344
if 'SwapTotal' in result and 'SwapFree' in result :
342
345
result ['_SWAPUSED' ] = result ['SwapTotal' ] - result ['SwapFree' ]
343
- if 'HugePages_Total' in result :
344
- result ['_HUGEPAGES' ] = result ['HugePages_Total' ]
346
+ if 'Hugepagesize' in result :
347
+ if 'HugePages_Total' in result :
348
+ result ['_HUGEPAGES_SIZE' ] = result ['Hugepagesize' ] * result ['HugePages_Total' ]
349
+ if 'HugePages_Free' in result :
350
+ result ['_HUGEPAGES_FREE' ] = result ['Hugepagesize' ] * result ['HugePages_Free' ]
345
351
if 'Cached' in result :
346
352
result ['_CACHED' ] = result ['Cached' ]
347
353
if 'Dirty' in result :
0 commit comments