#1034145 htop: Sort does not work?

Package:
htop
Source:
htop
Description:
interactive processes viewer
Submitter:
ael
Date:
2023-04-10 11:39:06 UTC
Severity:
normal
#1034145#5
Date:
2023-04-10 11:00:33 UTC
From:
To:
I have noticed for some time now that htop does not seem to sort
properly.

Using F6/sort option, I find that the list is usually sorted by PID
regardless of whetehr I have chooseb other choices. I usually want a
sort by CP usage or Memory.

This seems to be a problem with the user interface: ncurses?. Using the -s option
as in
$ htop -s PERCENT_CPU
it sorts as expected.
----------------------------------------------------------------

#1034145#10
Date:
2023-04-10 11:08:42 UTC
From:
To:
Am 10.04.23 um 13:00 schrieb ael:

Can you delete / move away your ~/.config/htoprc (which htop is not
running) and try again?

On Debian testing, same versions, I cannot reproduce the issue at the
moment.

#1034145#15
Date:
2023-04-10 11:35:15 UTC
From:
To:
I should have thought of looking there..
It included
.tree_sort_key=PERCENT_MEM
which was not being respected.

I have now deleted it, and htop seems to be sorting properly again.
So this seems to have fixed things for now at least.

Thanks.

ael

#1034145#20
Date:
2023-04-10 11:37:32 UTC
From:
To:
Just another note. The problem happened on at least two different
installations running testing. I haven't yet checked whether deleting htoprc
on the other box will also fix the problem, but it seems very likely.

Thanks again,

ael