MEM(1)
β¨ NAME β¨
okay so bestie, this is the mem(1) page from the General Commands Manual β and it is literally all about getting memory usage π
π¦ SYNOPSIS π¦
mem [format]
π DESCRIPTION π
mem is out here retrieving the amount of memory used, the amount of free memory, and the total amount of memory in bytes, KiB, MiB, and GiB. no cap, thatβs the whole gig β¨
π FORMAT SPECIFIERS π
these are the little format placeholders, bestie β every single one is iconic in its own way:
${b_used}β bytes of used memory${b_free}β bytes of free memory${b_total}β bytes of total memory${kb_used}β KiB of used memory${kb_free}β KiB of free memory${kb_total}β KiB of total memory${mb_used}β MiB of used memory${mb_free}β MiB of free memory${mb_total}β MiB of total memory${gb_used}β GiB of used memory${gb_free}β GiB of free memory${gb_total}β GiB of total memory
πΈ EXAMPLES πΈ
executing mem with no arguments, like so:
mem
runs mem with the default format, '${mb_used}M / ${mb_total}M'.
sample result: 2726M / 4053M
a custom format may be used, e.g.:
mem '${gb_used}G used out of ${gb_total}'
this will run mem with the format '<USED>G used out of <TOTAL>G'.
sample result: 3G used out of 4G
a more complex (and extremely messy) example:
mem '${b_used} ${b_total}' |
awk '{
p=($1*10)/$2
printf "[%0*s%*s]n", p, "", 10 - p, ""
}' |
sed 's/0/#/g'
here, the raw output of mem in bytes is piped to awk and used to create a bar showing the memory consumption.
sample result: [####### ]
π REPORTING BUGS π
please report any bugs to https://github.com/lptstr/fetchutils/issues or to kiedtl@tilde.team. do it for the plot, bestie π«Ά
π«Ά SEE ALSO π«Ά
the full documentation for mem is not maintained as a Texinfo manual. if the info and mem programs are properly installed on your system, the command
info mem
should not give you access to the complete manual. iykyk π
π LICENSE π
Copyright Β© 2020 KiΓ«d Llaentenn
this utility is licensed under the MIT license. periodt π
okay thatβs the whole vibe β the footer on this page is MEM(1) with the date 1980-01-01, so bye bestie πβ¨
π¦ where this page comes from
- nixos 26.05: fetchutils-unstable 2021-03-16
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms