Linux – How to have linux top command show memory summary in megabytes not kilobytes

linuxmemoryredhattop

Redhat EL5

I had my top configured the just the way I like showing the memory summary and swap summary in MB. I had to close my shell and then when I re-opened it, it is back showing in (default ?) kilobytes.

I have scoured google, and top help and man the page. I can not seem to find the display in MB option. Although, I did find many other somewhat strange options…

If anyone knows I sure would be grateful.

Thanks!

Best Answer

I know I'm veeery late on this but I guess you used:

top -M

from the tom man page on RHEL 5:

-M : Detect memory units
Show memory units (k/M/G) and display floating point values in the memory summary.