hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.84k stars 581 forks source link

pid column doesn't align when six-digit pids appear after htop starts #948

Open lilydjwg opened 5 years ago

lilydjwg commented 5 years ago

Since systemd 243 large pids is configured as default. htop tries to figure out the required minimum width when it starts, but when it starts soon after system boot and then keeps running, the display will finally misalign.

NoSuck commented 4 years ago

I noticed this as well on an Arch Linux machine. Tree mode looks like this:

START  PPID   PID   RES MEM% CPU% USER      Command
22:40     0     1 10936  0.1  0.0 root      /sbin/init
14:31     1 280097  1032  0.0  0.0 user      ├─ gpg-agent --homedir /home/user/.gnupg-makepkg --use-standard-socket --daemon
14:31     1 280081 14820  0.1  0.0 user      ├─ dirmngr --daemon --homedir /home/user/.gnupg-makepkg
00:00     1 31336 44860  0.3  0.0 root      ├─ /usr/bin/atop -R -w /var/log/atop/atop_20191003 600
13:26     1 30594  1288  0.0  0.0 user      ├─ unclutter -idle 1 -jitter 2 -reset
12:48     1 25713  8284  0.1  0.0 root      ├─ /usr/lib/upowerd
12:48     1 25716  8284  0.1  0.0 root      │  ├─ /usr/lib/upowerd
12:48     1 25715  8284  0.1  0.0 root      │  └─ /usr/lib/upowerd
23:11     1 20872 11288  0.1  0.0 user      ├─ python3 /home/user/.local/bin/qutebrowser
23:11 20872 20879  424M  2.7  0.0 user      │  └─ /usr/bin/python3 /usr/bin/qutebrowser
14:27 20872 279144  424M  2.7  0.0 user      │     ├─ /usr/bin/python3 /usr/bin/qutebrowser