Sunday, May 5, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 10225  / 2 Years ago, tue, september 13, 2022, 11:50:21

I would like to leave an application running in my terminal that shows me the memory usage, similar to how top shows CPU and other info, and iotop shows the top I/O users.



Top and iotop



Does such an application exist?



P.S. I know top shows memory usage as well, but I'm talking about sorting by top memory usage and not showing any other info (similar to what iotop does).


More From » software-recommendation

 Answers
3

The closest I could find is memtop, a Python script available here on Google Code.



Screenshot:
enter image description here



How to use memtop




  • It's a Python script, so simply do a sudo mv memtop-1.0.0.py /usr/bin/memtop.py and a chmod +x /path/to/memtop.py to make it executable

  • Default update period is 15 min; use switch -p 1 to make it 1 minute, etc. (can't go lower than that unless you modify the source)

  • Use -l N, where N is the number of processes you want to show, depending on the size of your terminal.

  • Use -m to show "more" information, i.e. the Swap/Page stats at the bottom of the screenshot.






The htop disguised as memtop option



If you don't use htop otherwise, it's pretty easy to set it up with the F2-setup option to look like memtop:



enter image description here




  • htop config is stored in ~/.config/htop/htoprc, so just delete htoprc to restore normal htop.


[#38100] Thursday, September 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
needstar

Total Points: 268
Total Questions: 108
Total Answers: 117

Location: Seychelles
Member since Mon, Jun 28, 2021
3 Years ago
;