Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Looks like the default precision has changed in Arch, but I checked top (1), I didn't find anything related to precision, maybe I've used the wrong jargon.

enter image description here

Right now it's 3 bit precision, I want only one. How can I change that?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you're talking of the top from procps-ng, then it's done at compilation time.

Wide percentages used to be off by default, and you had to change it (PERCENTBOOST in top/top.h), but now it's on by default (see this change), and you turn it off with NOBOOST_MEMS and NOBOOST_PCNT in top/top.h.

You could do:

sudo perl -pi-orig -e 's/%#\.3f/%#.1f/g;s/%#\.2f/%#.0f/g' "$(
  command -v top)"

But that wouldn't reclaim the screen real-estate.

Or you could use other top implementations like htop.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.