Integrate memory page details

This commit is contained in:
Carsten Grohmann 2018-04-15 20:14:29 +02:00
parent b94be9836e
commit e29bf05efd
2 changed files with 68 additions and 6 deletions

View File

@ -200,6 +200,55 @@ function goBack() {
<td colspan="2"><div id="svg_swap"></div></td> <td colspan="2"><div id="svg_swap"></div></td>
</tr> </tr>
<!-- Page Usage -->
<tr>
<td style="font-weight: bold">Memory Pages</td>
<td></td>
<td></td>
</tr>
<tr>
<td>RAM pages</td>
<td id="ram_pages" class="pages"></td>
<td>Total number of RAM pages
</td>
</tr>
<tr>
<td>HighMem/MovableOnly</td>
<td id="highmem_pages" class="pages"></td>
<td>Number of pages in the High Memory Area or marked movable for Contiguous Memory Allocator (CMA).
<br>
HighMem pages are also counted in the total page number.
</td>
</tr>
<tr>
<td>Reserved pages</td>
<td id="reserved_pages" class="pages"></td>
<td>Number of reserved pages
</td>
</tr>
<tr>
<td>CMA reserved pages</td>
<td id="cma_pages" class="pages">0</td>
<td>Pages reserved for Contiguous Memory Allocator (CMA)
</td>
</tr>
<tr>
<td>Pagetable Cache</td>
<td id="pagetablecache_pages" class="pages">0</td>
<td>Number of pages in pagetable cache
</td>
</tr>
<tr>
<td>Number of pages with hardware errors</td>
<td id="hwpoisoned_pages" class="pages">0</td>
<td>Pages with uncorrectable memory errors
</td>
</tr>
<!-- Memory Usage Details -->
<tr> <tr>
<td style="font-weight: bold">Memory Usage Details</td> <td style="font-weight: bold">Memory Usage Details</td>
<td></td> <td></td>

View File

@ -373,11 +373,25 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k
re.MULTILINE) re.MULTILINE)
REC_PAGEINFO = re.compile( REC_PAGEINFO = re.compile(
r'^(?P<ram_pages>\d)+ pages RAM' r'^(?P<ram_pages>\d+) pages RAM'
r'('
r'(?:\n)' r'(?:\n)'
r'^(?P<highmem_pages>\d+) pages HighMem/MovableOnly' r'^(?P<highmem_pages>\d+) pages HighMem/MovableOnly'
r')?'
r'(?:\n)' r'(?:\n)'
r'^(?P<reserved_pages>\d+) pages reserved', r'^(?P<reserved_pages>\d+) pages reserved'
r'('
r'(?:\n)'
r'^(?P<cma_pages>\d+) pages cma reserved'
r')?'
r'('
r'(?:\n)'
r'^(?P<pagetablecache_pages>\d+) pages in pagetable cache'
r')?'
r'('
r'(?:\n)'
r'^(?P<hwpoisoned_pages>\d+) pages hwpoisoned'
r')?',
re.MULTILINE) re.MULTILINE)
REC_PROCESSES = re.compile( REC_PROCESSES = re.compile(
@ -625,10 +639,9 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k
if match: if match:
self.details.update(match.groupdict()) self.details.update(match.groupdict())
# TODO Add to HTML match = self.REC_PAGEINFO.search(self.oom.text)
#match = self.REC_PAGEINFO.search(self.oom.text) if match:
# if match: self.details.update(match.groupdict())
# self.details.update(match.groupdict())
match = self.REC_PROCESSES.search(self.oom.text) match = self.REC_PROCESSES.search(self.oom.text)
if match: if match: