[procps] Re: top - mem unit scale overshot

  • From: Jim Warner <james.warner@xxxxxxxxxxx>
  • To: Procps-ng Mail list <procps@xxxxxxxxxxxxx>, Jan Rybar <jrybar@xxxxxxxxxx>
  • Date: Mon, 6 Mar 2017 11:37:51 -0600

On 03/06/2017 10:46 AM, Jan Rybar wrote:

I wanted to ask what would happen if I changed "Resident Memory" field
(among others) size from 6 to 7 in top/top.c.

I happens that when a process takes more than 10GiB memory, the field
outputs numbers in terabytes, e.g. 0.011t, which is needlessly imprecise
and annoying (falls to TiB in scale_mem()).

I changed the size to 7 in Fieldstab[], tried it for short time and
checked visually. Works, but you have better knowledge about field size
robustness.

Patch is for master, but the problem is in newlib too.

Hi Jan,

I think a better solution, for both the Summary and Task areas, might be to reduce the number of decimal places to just 1.

That's an approach I've been evaluating ever these issues were raised.
        https://gitlab.com/procps-ng/procps/issues/50
        https://gitlab.com/procps-ng/procps/issues/53

How would you feel about that?

On a separate note, would you please withdraw your merge request #42.

I'm not sure what prompted your merge request, but (forgive me) both the code and the affect on the UI is terrible.

The newlib branch already achieves the desired results (without the need for a new switch) and I may yet redesign the master version to emulate the newlib affect.

Regards,
Jim

Other related posts: