summaryrefslogtreecommitdiffstats
path: root/Action.c
diff options
context:
space:
mode:
authorDavid Zarzycki <dave@znu.io>2021-01-07 08:38:18 -0500
committerBenBE <BenBE@geshi.org>2021-01-11 20:27:47 +0100
commit37e186fd6626e83f51d0267052677355575964d4 (patch)
treec3212ebbc5a948c4ede190defadd8f56e097d45b /Action.c
parentf4404effa45ce378a8a72f2fff9641c7d7a0cc6f (diff)
Linux: Add SwapCached to the swap meter
According to the Linux kernel documentation, "SwapCached" tracks "memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)."
Diffstat (limited to 'Action.c')
-rw-r--r--Action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Action.c b/Action.c
index 578882db..0b5c8990 100644
--- a/Action.c
+++ b/Action.c
@@ -528,7 +528,13 @@ static Htop_Reaction actionHelp(State* st) {
mvaddstr(line++, 0, "Swap bar: ");
addattrstr(CRT_colors[BAR_BORDER], "[");
addattrstr(CRT_colors[SWAP], "used");
+#ifdef HTOP_LINUX
+ addattrstr(CRT_colors[BAR_SHADOW], "/");
+ addattrstr(CRT_colors[SWAP_CACHE], "cache");
+ addattrstr(CRT_colors[BAR_SHADOW], " used/total");
+#else
addattrstr(CRT_colors[BAR_SHADOW], " used/total");
+#endif
addattrstr(CRT_colors[BAR_BORDER], "]");
attrset(CRT_colors[DEFAULT_COLOR]);
mvaddstr(line++, 0, "Type and layout of header meters are configurable in the setup screen.");

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