added ram stats
This commit is contained in:
parent
a52a17ac25
commit
2a104d7459
@ -52,4 +52,5 @@ class SerializedData:
|
|||||||
stats['blockCount'] = len(blockmetadb.get_block_list())
|
stats['blockCount'] = len(blockmetadb.get_block_list())
|
||||||
stats['blockQueueCount'] = len(comm_inst.blockQueue)
|
stats['blockQueueCount'] = len(comm_inst.blockQueue)
|
||||||
stats['threads'] = proc.num_threads()
|
stats['threads'] = proc.num_threads()
|
||||||
|
stats['ramPercent'] = proc.memory_percent()
|
||||||
return json.dumps(stats)
|
return json.dumps(stats)
|
||||||
|
@ -268,6 +268,10 @@
|
|||||||
<i class="fas fa-microchip"></i>
|
<i class="fas fa-microchip"></i>
|
||||||
Current CPU threads: <span id="threads"></span>
|
Current CPU threads: <span id="threads"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<i class="fas fa-memory"></i>
|
||||||
|
RAM usage: <span id="ramPercent"></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,6 +99,7 @@ var getStats = function(){
|
|||||||
storedBlockDisplay.innerText = stats['blockCount']
|
storedBlockDisplay.innerText = stats['blockCount']
|
||||||
queuedBlockDisplay.innerText = stats['blockQueueCount']
|
queuedBlockDisplay.innerText = stats['blockQueueCount']
|
||||||
document.getElementById('threads').innerText = stats['threads']
|
document.getElementById('threads').innerText = stats['threads']
|
||||||
|
document.getElementById('ramPercent').innerText = (stats['ramPercent']).toFixed(2) + '%'
|
||||||
securityLevel.innerText = sec_description_str
|
securityLevel.innerText = sec_description_str
|
||||||
fetch('/hitcount', {
|
fetch('/hitcount', {
|
||||||
headers: {
|
headers: {
|
||||||
|
Loading…
Reference in New Issue
Block a user