In bug reports it is sometimes useful to know how much available memory the host has. This is especially useful in bug reports detailing ICEs, since GCC does not always deal with memory allocation properly. So why don't we have `emerge --info' tell us what RAM is available?
I guess we could parse the output of `free`. Maybe we should show the total amount of swap too.
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9a3a82fda113008b877c0447e1d6a8780365ab98 Output is formatted similarly to top: KiB Mem: 8110136 total, 1115784 free KiB Swap: 8388604 total, 8311120 free
This is fixed in 2.1.11.43 and 2.2.0_alpha154.
JFYI, as implemented this excludes buffers/cache from "free" memory: $ emerge --info [...] KiB Mem: 8308588 total, 1079652 free KiB Swap: 4193276 total, 3896084 free [...] $ free total used free shared buffers cached Mem: 8308588 7199116 1109472 0 476892 6028944 -/+ buffers/cache: 693280 7615308 Swap: 4193276 297192 3896084 Depending on how you intend to use it, it might be more useful to include buffers/cache in free memory (second line) since they'll be discarded if memory pressure increases.
(In reply to comment #4) > Depending on how you intend to use it, it might be more useful to include > buffers/cache in free memory (second line) since they'll be discarded if > memory pressure increases. If the current behavior is insufficient, I'd suggest to extend it to contain more fields, like the `top` command does: KiB Mem: 8110136 total, 7909268 used, 200868 free, 28468 buffers KiB Swap: 8388604 total, 111044 used, 8277560 free, 6117808 cached