diff --git a/src/onionrstatistics/serializeddata.py b/src/onionrstatistics/serializeddata.py index 2d03ed77..fab01298 100755 --- a/src/onionrstatistics/serializeddata.py +++ b/src/onionrstatistics/serializeddata.py @@ -52,4 +52,5 @@ class SerializedData: stats['blockCount'] = len(blockmetadb.get_block_list()) stats['blockQueueCount'] = len(comm_inst.blockQueue) stats['threads'] = proc.num_threads() + stats['ramPercent'] = proc.memory_percent() return json.dumps(stats) diff --git a/static-data/www/private/index.html b/static-data/www/private/index.html index cf210853..efd77806 100755 --- a/static-data/www/private/index.html +++ b/static-data/www/private/index.html @@ -268,6 +268,10 @@ Current CPU threads: +
+ + RAM usage: +
diff --git a/static-data/www/shared/main/stats.js b/static-data/www/shared/main/stats.js index 595fbfc0..e6f487e2 100755 --- a/static-data/www/shared/main/stats.js +++ b/static-data/www/shared/main/stats.js @@ -99,6 +99,7 @@ var getStats = function(){ storedBlockDisplay.innerText = stats['blockCount'] queuedBlockDisplay.innerText = stats['blockQueueCount'] document.getElementById('threads').innerText = stats['threads'] + document.getElementById('ramPercent').innerText = (stats['ramPercent']).toFixed(2) + '%' securityLevel.innerText = sec_description_str fetch('/hitcount', { headers: {