How to see swap file usage breakdown

Is there a package that displays swap file usage breakdown by process?

If that is htop, where can I see that breakdown?

(In htop I see the total swap usage near the top. In the “Main” screen, there is a column for “MEM%” but not swap. I presume “MEM%” is regular RAM. In the “I/0” screen, there is “SWPD%,” which may or may not relate to swap usage, but it does not show anything like a percentage or amount in e.g. megabytes.)

If I need to install a package, I would like it to be from the regular repository.

(What I mean by that is that I would not like to enable or install flatpak, snapd, or anything that requires special/separate care.)

My desktop if Xfce. Thanks.

Add M_SWAP to the active columns.

Thank you.

For anybody else trying to do the same thing for the first time, I did:

  1. F2 for setup
  2. See that the highlight is on “Display options” under “Category” > use arrow keys (down) to go down to “Screens”
  3. Use arrow keys (right) to go to “Available Columns”
  4. Use arrow keys (down) to go to “M_SWAP”
  5. Press ENTER key to add “M_SWAP”
  6. Use arrow keys (left) to go to “M_SWAP” in the “Active Columns”
  7. Press ENTER to make it movable (red) > use arrow keys to move it to the position you want.
  8. ENTER again to fix the position.
  9. F10 to exit.

Instead of the arrow keys, you can use the mouse too if the item you want is not off the terminal screen.

If you don’t use F10 (but simply close the terminal emulator), the new M_SWAP column may not persist to the next session. (I am not 100% sure about this.)

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.