Adds support for memory usage in percent

This commit is contained in:
Franck Nijhof 2019-08-18 14:50:06 +02:00
parent d5848fc7e0
commit 75590a9ac1
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
3 changed files with 39 additions and 2 deletions

View file

@ -271,6 +271,14 @@ function bashio::supervisor.memory_limit() {
bashio::supervisor.stats 'supervisor.stats.memory_limit' '.memory_limit'
}
# ------------------------------------------------------------------------------
# Returns memory usage in percent from the Supervisor.
# ------------------------------------------------------------------------------
function bashio::supervisor.memory_percent() {
bashio::log.trace "${FUNCNAME[0]}"
bashio::supervisor.stats 'supervisor.stats.memory_percent' '.memory_percent'
}
# ------------------------------------------------------------------------------
# Returns outgoing network usage from the Supervisor.
# ------------------------------------------------------------------------------