7

I'm trying to switch from using htop to top because a few too many times I have been in servers that don't have the former.

When I first type top and enter, the memory usage in shown in MiB:

first top output

Then I like to toggle it to GiB with E so the numbers feel more comfortable to read:

second top output

And finally I toggle the memory bar with m:

final top output

But after this final step I see the numbers 61,8/15,2. It seems obvious to me that 15.2 is the available RAM, but what about the 61,8 meaning? In this format I would expect to have the used memory in this side of the bar but this is obviously not it.

1 Answer 1

11

The values next to the memory bar show the percentage of used memory (out of the total) and the total memory. For this display, “used” is defined as “total minus available���; 61.8% of 15.2GiB is 9.4GiB, which matches the 5.9GiB of available memory (with rounding errors).

See man top for details.

2
  • It makes sense, although its hard to compare the estimate with absolute numbers. When I have 15.2/4.4/8.6 Total/free/used memory, the bar says 66.5% is being used. Not only 15.2-4.4=10.7 is not equal to 8.6, but also 66.6% is neither 8.6/15.2 nor 10.7/15.2. But I do understand this has probably something to do with memory types. Commented Jul 8 at 13:20
  • Yes, it’s confusing: as I said in the answer, in the memory bar display, “used” is “total minus available”, which isn’t the same as “used” in the main display. Commented Jul 8 at 14:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .