Skip to content

Commit

Permalink
Merge pull request #463 from mathoudebine/fix/449-proper-units-for-ra…
Browse files Browse the repository at this point in the history
…m-and-disks
  • Loading branch information
mathoudebine committed Jan 30, 2024
2 parents 08b769b + 8947951 commit 0336636
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,21 +362,21 @@ def stats():

display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['USED'],
value=int(sensors.Memory.virtual_used() / 1000000),
value=int(sensors.Memory.virtual_used() / 1024**2),
min_size=5,
unit=" M"
)

display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['FREE'],
value=int(sensors.Memory.virtual_free() / 1000000),
value=int(sensors.Memory.virtual_free() / 1024**2),
min_size=5,
unit=" M"
)

display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['TOTAL'],
value=int((sensors.Memory.virtual_free() + sensors.Memory.virtual_used()) / 1000000),
value=int((sensors.Memory.virtual_free() + sensors.Memory.virtual_used()) / 1024**2),
min_size=5,
unit=" M"
)
Expand Down

0 comments on commit 0336636

Please sign in to comment.