[procps] top - mem unit scale overshot

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

Hello Jim,

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.

Cheers.

Jan

Attachment: top_mem_unit_scale.patch.tar.gz
Description: application/gzip

Other related posts: