+++ date = "2023-11-16T14:41:01+00:00" lastmod = "2023-11-17T19:41:23+00:00" tags = [ "gists", "linux" ] +++ An actual _but where did my Linux memory go_ command; This [program](https://www.selenic.com/smem/) ([repositories](https://repology.org/project/smem/versions)) came in handy while helping someone resolve an {{< abbr oom "out of memory" >}} problem. Want to [see memory usage and shared memory](https://linux.die.net/man/8/smem), perhaps sorted by swap? ```shell smem -s swap -kta smem --sort swap --abbreviate --totals --autosize ``` {{< disclose >}} What about on other categories running a `--sort`? {{}} ```text swap (amount of swap space consumed ignoring sharing) command (process command line) maps (total mappings count) name (process name) pid (process id #) user (process owner) pss (proportional set size including sharing) rss (resident set size ignoring sharing) uss (unique set size) vss (virtual set size; total virtual memory mapped) ``` {{< disclose >}} Bonus: A [filesystem usage command](https://man.archlinux.org/man/df.1) to catch `/tmp/` and `tmpfs` (temporary file storage) abusers; {{}} ```shell df -h | grep tmpfs df --human-readable | grep tmpfs ```