Skip to content

Commit

Permalink
Merge pull request #1695 from anjz/feature/containers-rss
Browse files Browse the repository at this point in the history
Add RSS metric for containers
  • Loading branch information
nicolargo committed Aug 13, 2020
2 parents 9f8a812 + c6e6042 commit e13cf7e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions glances/outputs/static/js/components/plugin-docker/view.html
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
5 changes: 2 additions & 3 deletions glances/plugins/glances_docker.py
Expand Up @@ -319,9 +319,8 @@ def get_docker_memory(self, container_id, all_stats):
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']
Expand Down

0 comments on commit e13cf7e

Please sign in to comment.