Merge pull request #1695 from anjz/feature/containers-rss

Add RSS metric for containers
This commit is contained in:
Nicolas Hennion 2020-08-13 18:10:44 +02:00 committed by GitHub
commit e13cf7e5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -19,6 +19,7 @@ export default function GlancesPluginDockerController($scope, GlancesStats) {
'status': containerData.Status,
'cpu': containerData.cpu.total,
'memory': containerData.memory.usage != undefined ? containerData.memory.usage : '?',
'rss': containerData.memory.rss != undefined ? containerData.memory.usage: '?',
'ior': containerData.io.ior != undefined ? containerData.io.ior : '?',
'iow': containerData.io.iow != undefined ? containerData.io.iow : '?',
'io_time_since_update': containerData.io.time_since_update,

View File

@ -7,6 +7,7 @@
<div class="table-cell">Status</div>
<div class="table-cell">CPU%</div>
<div class="table-cell">MEM</div>
<div class="table-cell">RSS</div>
<div class="table-cell">IOR/s</div>
<div class="table-cell">IOW/s</div>
<div class="table-cell">RX/s</div>
@ -19,6 +20,7 @@
</div>
<div class="table-cell">{{ container.cpu | number:1 }}</div>
<div class="table-cell">{{ container.memory | bytes }}</div>
<div class="table-cell">{{ container.rss | bytes }}</div>
<div class="table-cell">{{ container.ior / container.io_time_since_update | bits }}</div>
<div class="table-cell">{{ container.iow / container.io_time_since_update | bits }}</div>
<div class="table-cell">{{ container.rx / container.net_time_since_update | bits }}</div>

View File

@ -319,9 +319,8 @@ class Plugin(GlancesPlugin):
ret = {}
# Read the stats
try:
# Do not exist anymore with Docker 1.11 (issue #848)
# ret['rss'] = all_stats['memory_stats']['stats']['rss']
# ret['cache'] = all_stats['memory_stats']['stats']['cache']
ret['rss'] = all_stats['memory_stats']['stats']['rss']
ret['cache'] = all_stats['memory_stats']['stats']['cache']
ret['usage'] = all_stats['memory_stats']['usage']
ret['limit'] = all_stats['memory_stats']['limit']
ret['max_usage'] = all_stats['memory_stats']['max_usage']