Just a useful memory util I'd like to share.

If it doesn't relate to Debian, but you still want to share it, please do it here

Just a useful memory util I'd like to share.

Postby Deb-fan » 2020-02-21 21:53

Well accurately gauging memory in use can be a headache. Sometimes different utils like to show slightly different stats. When someone is as fanatical about checking this type of thing as I am, this shall not do! Using the "free -m" command is handy, installing and using ps_mem handier still but introducing the smem package. Thing shows uss/pss and rss with (oops typo)pss supposedly being the gold standard showing what's being used memory-wise. Am fond of this cmd here, "smem -t -k" but "smem -h" gives help info for what's available in it.

"apt search smem" and/or "apt show smem" It's fun to dork with, Enjoy. :)
Deb-fan
 
Posts: 693
Joined: 2012-08-14 12:27

Re: Just a useful memory util I'd like to share.

Postby Deb-fan » 2020-02-21 23:39

Kind of odd the guy posting about something turns around and asks about it but hey, plenty of tech savvy types to ask here. What do you guys think of smem vs ps_mem in terms of accuracy ? Personally lean towards smem due to the wealth of options. Thing even reports it's own process memory stats in the output. Kinda would like to see that stripped out, looks like is added to the pss total too so would have to subtract that i think but am not adding up the whole column to see. :) Other junk smem reports individual processes whereas ps_mem just combines the things Ie xterm(2) with it means 2 xterm processes running. So whatcha think fellas which is more accurate? Two python solutions, just very slightly different stats, arghhhh. Still appears to be about as good as a nixers gonna get in this deal.

Also by the way folks can also minus off the terminal process from your total. If you were wanting to see what the system is using and running the cmd in xterm, memory used/shown for that xterm process don't count. Still find it oddball but hey thorough that smem reports it's own processes memory used.
Deb-fan
 
Posts: 693
Joined: 2012-08-14 12:27

Re: Just a useful memory util I'd like to share.

Postby Deb-fan » 2020-03-08 04:04

Random update:

Come to much prefer smem, think it's more accurate and versatile over ps_mem. Another thing I've noticed here, recently compiled a couple newer Kernel's v 5.4's as result the output of ps_mem went wonky, whereas smem and the "free -m" cmds-etc had no problems. Likely only means I'd have to reinstall ps_mem to get it up to speed with the system changes, working right again. Going to just uninstall it instead and rely on smem though. :)
Deb-fan
 
Posts: 693
Joined: 2012-08-14 12:27

Re: Just a useful memory util I'd like to share.

Postby Deb-fan » 2020-03-09 22:38

More randomness about this, smem vs ps_mem. Not only is smem more accurate, it's a full binary app and managed by the OS's pkg management tools, apt/itude etc, whereas ps_mem is just a scripty thing. Also doesn't need it (neither do) though do tend to run smem with sudo privs. Only added it to a file kept in /etc/sudoers.d by adding /usr/bin/smem let's it run as sudo w/o passwd required. Also added a bash alias to my .bash_aliases file in /home. Just mem="sudo smem -tk" just type mem in terminals to see current system pss memory useage. Cool stuff. :)
Deb-fan
 
Posts: 693
Joined: 2012-08-14 12:27


Return to Offtopic

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable