ENH reformat cache/swap values
This commit is contained in:
parent
60157ab71a
commit
c771bdab46
2
core
2
core
|
@ -1 +1 @@
|
|||
Subproject commit 5d077e82cf855a441d664b0c5968db2c56de5b96
|
||||
Subproject commit 386b543405c8932045500bef836adea5d8f5abae
|
|
@ -510,7 +510,8 @@ M.initTextRows_color = function(x, y, w, spacing, labels, color, format)
|
|||
#labels,
|
||||
_text_row_style('right', color),
|
||||
format,
|
||||
spacing
|
||||
spacing,
|
||||
0
|
||||
)
|
||||
}
|
||||
end
|
||||
|
|
|
@ -76,7 +76,7 @@ return function(update_freq)
|
|||
SWAP_BUFFERS_WIDTH,
|
||||
TEXT_SPACING,
|
||||
{'Page Cache', 'Buffers', 'Kernel Slab'},
|
||||
'%s%%'
|
||||
'%.1f%%'
|
||||
)
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
@ -135,19 +135,13 @@ return function(update_freq)
|
|||
Dial.set(dial, used_percent)
|
||||
Common.text_ring_set(text_ring, cr, Util.round_to_string(used_percent * 100))
|
||||
|
||||
Common.text_row_crit_set(swap, cr,
|
||||
Util.precision_round_to_string(
|
||||
(swap_total_kb - swap_free_kb)
|
||||
/ swap_total_kb * 100))
|
||||
Common.text_row_crit_set(
|
||||
swap, cr, (swap_total_kb - swap_free_kb) / swap_total_kb * 100
|
||||
)
|
||||
|
||||
Common.text_rows_set(cache, cr, 1, Util.precision_round_to_string(
|
||||
cached_kb / mem_total_kb * 100))
|
||||
|
||||
Common.text_rows_set(cache, cr, 2, Util.precision_round_to_string(
|
||||
buffers_kb / mem_total_kb * 100))
|
||||
|
||||
Common.text_rows_set(cache, cr, 3, Util.precision_round_to_string(
|
||||
slab_reclaimable_kb / mem_total_kb * 100))
|
||||
Common.text_rows_set(cache, cr, 1, cached_kb / mem_total_kb * 100)
|
||||
Common.text_rows_set(cache, cr, 2, buffers_kb / mem_total_kb * 100)
|
||||
Common.text_rows_set(cache, cr, 3, slab_reclaimable_kb / mem_total_kb * 100)
|
||||
|
||||
Timeseries.update(plot, used_percent)
|
||||
|
||||
|
|
Loading…
Reference in New Issue