htop icon indicating copy to clipboard operation
htop copied to clipboard

Option -t makes any sorting useless and the tree static

Open notorand-it opened this issue 1 year ago • 1 comments

When you use -t/--tree option, any sorting defined with the -s/--sort-key stops making any sense.

The process tree starts from the init process (systemd nowadays) with PID:1 and goes down acconrding the system boot order. In my 317x88 virtual terminal this tree is static and sorted by the tree structure itself. So, whatever you have setup in -s/--sort-key option, the process tree structure won't sort at all.

I would make this clear in the documentation and maybe, spit a warning out when both -t/--tree and -s/--sort-key are used at the same time.

notorand-it avatar Jan 25 '24 15:01 notorand-it

The sorting in tree mode works based on the direct children for each parent.

Unfortunately, in the 3.3.0 release there has been a bug (cf. #1378), which got resolved in #1380.

BenBE avatar Jan 25 '24 22:01 BenBE