summaryrefslogtreecommitdiffstats
path: root/Action.c
diff options
context:
space:
mode:
authorIvan Shapovalov <intelfx@intelfx.name>2022-12-27 04:57:52 +0400
committerBenBE <BenBE@geshi.org>2023-04-23 16:00:17 +0200
commitb29b33ebb9ae80a95e7d09eb537e0fccc5043d68 (patch)
treebbd2c2642784757885d150ba0c598877f6f3e9d7 /Action.c
parentb2ada278403e643a3bc339783740f262b7879803 (diff)
{Memory,Swap}Meter: add "compressed memory" metrics
For now, the semantics are mostly fit for Linux zswap subsystem. For instance, we add the third swap usage metric that indicates the amount of memory that is accounted to swap but in fact stored elsewhere. This exactly matches the definition of frontswap/zswap, and is probably of little use to all other platforms.
Diffstat (limited to 'Action.c')
-rw-r--r--Action.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Action.c b/Action.c
index a67233cc..18c990e0 100644
--- a/Action.c
+++ b/Action.c
@@ -674,10 +674,11 @@ static Htop_Reaction actionHelp(State* st) {
mvaddstr(line++, 0, "Memory bar: ");
addattrstr(CRT_colors[BAR_BORDER], "[");
addbartext(CRT_colors[MEMORY_USED], "", "used");
+ addbartext(CRT_colors[MEMORY_COMPRESSED], "/", "compressed");
addbartext(CRT_colors[MEMORY_BUFFERS_TEXT], "/", "buffers");
addbartext(CRT_colors[MEMORY_SHARED], "/", "shared");
addbartext(CRT_colors[MEMORY_CACHE], "/", "cache");
- addbartext(CRT_colors[BAR_SHADOW], " ", "used");
+ addbartext(CRT_colors[BAR_SHADOW], " ", "used");
addbartext(CRT_colors[BAR_SHADOW], "/", "total");
addattrstr(CRT_colors[BAR_BORDER], "]");
@@ -687,10 +688,11 @@ static Htop_Reaction actionHelp(State* st) {
addbartext(CRT_colors[SWAP], "", "used");
#ifdef HTOP_LINUX
addbartext(CRT_colors[SWAP_CACHE], "/", "cache");
+ addbartext(CRT_colors[SWAP_FRONTSWAP], "/", "frontswap");
#else
addbartext(CRT_colors[SWAP_CACHE], " ", "");
#endif
- addbartext(CRT_colors[BAR_SHADOW], " ", "used");
+ addbartext(CRT_colors[BAR_SHADOW], " ", "used");
addbartext(CRT_colors[BAR_SHADOW], "/", "total");
addattrstr(CRT_colors[BAR_BORDER], "]");

© 2014-2024 Faster IT GmbH | imprint | privacy policy