21

In htop I would like to order processes by CPU utilization but the top processes bounce back and forth so it is difficult to view the details of each process. I would like to be able to sort in whatever preferred order then lock that order while each field continues to update.

1
  • I have the same issue. Unfortunately all the answers seem to suggest how to lower/stop the refresh rate, rather than freeze the task order while keeping a high refresh rate. Commented Aug 17, 2022 at 4:06

5 Answers 5

14

A similar question was asked on superuser in February https://superuser.com/questions/1036978/how-pause-list-of-process-in-htop

The accepted answer is to use the -d option to change the delay of the refresh.

From the man page:

-d --delay=DELAY

Delay between updates, in tenths of seconds

e.g. htop -d 100 to refresh every 10 seconds.

Judging by this bug report there is currently no way to pause htop completely. The suggestion is again to use the -d option. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821904

1
  • Inside the running top it is possible to press "d" key to change value of refresh rate (seconds), helpful if you ommit -d option at start Commented Jun 6, 2023 at 11:09
5

Use Z key inside of htop. Z: pause/resume process updates (from htop help F1).

You will still be able to select and preview processes. Also memory and cpu usage will be updated as well

1
  • 1
    Looks like this feature was introduced around htop 3.0. At least there's a change to it in the changelog at 3.0.3, and it doesn't seem to be present in the latest 2.x. Commented Jul 10, 2023 at 12:07
1

You can use Shift + f to follow a process in htop.

1
  • 1
    True, but following a process is different from "freezing a task order", right? Commented Feb 18, 2022 at 18:02
0

Use the cursor keys or click with the mouse to select a process line. It will freeze the order of the tasks but keeps refreshing.

To unfreeze, press Tab.

0

It's been a while, but, press F2 which will open Setup menu, on the first tab press Arrow down to get to Display Options, then left to go to the check boxes, go down now and check Update process names on every refresh and press F10 to save. Now restart htop and nothing will move around.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.