From 37e186fd6626e83f51d0267052677355575964d4 Mon Sep 17 00:00:00 2001 From: David Zarzycki Date: Thu, 7 Jan 2021 08:38:18 -0500 Subject: 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)." --- Action.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Action.c') 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."); -- cgit v1.2.3