[procps] Re: top - mem unit scale overshot

  • From: Jan Rybar <jrybar@xxxxxxxxxx>
  • To: Jim Warner <james.warner@xxxxxxxxxxx>, Procps-ng Mail list <procps@xxxxxxxxxxxxx>
  • Date: Mon, 6 Mar 2017 19:00:50 +0100

On 03/06/2017 06:37 PM, Jim Warner wrote:

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?

As I said, it's up to you what to do with this immediate and effortless solution of the problem. Whatever.


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.

I mentioned in the merge request that I know that it's already resolved in newlib and that is a fix for those who still use master. But you're the boss. Whatever.


Regards,
Jim

Other related posts: