The setup is I have two folders now under my current directory, busybox-1.36.1 and procps-4.0.4, and I also have a service languagetool running with DynamicUser=yes. Now observe the different behaviour:
Legend: ✅ Doesn't truncate; ❌ truncates.
busybox watch & busybox ps ✅
./busybox-1.36.1/bin/watch './busybox-1.36.1/bin/ps aux | grep languagetool' Every 2.0s: ./busybox-1.36.1/bin/ps aux | grep languagetool 2025-03-17 23:20:02 1026972 61534 39:36 java ...languagetool... 4053857 mathiass 0:00 ./busybox-1.36.1/bin/watch ./busybox-1.36.1/bin/ps aux | grep languagetool 4053882 mathiass 0:00 sh -c -- ./busybox-1.36.1/bin/ps aux | grep languagetool 4053884 mathiass 0:00 grep languagetool busybox watch & procps ps ✅
./busybox-1.36.1/bin/watch './procps-4.0.4/bin/ps aux | grep languagetool' Every 2.0s: ./procps-4.0.4/bin/ps aux | grep languagetool languag+ 1026972 0.1 13.6 14468788 4464816 ? Ssl Mar04 39:38 java ...languagetool... mathias+ 4057218 0.0 0.0 4676 2244 pts/32 S+ 23:35 0:00 ./busybox-1.36.1/bin/watch ./procps-4.0.4/bin/ps aux | grep languagetool mathias+ 4057222 0.0 0.0 231736 3788 pts/32 S+ 23:35 0:00 sh -c -- ./procps-4.0.4/bin/ps aux | grep languagetool mathias+ 4057224 0.0 0.0 230732 2520 pts/32 S+ 23:35 0:00 grep languagetool procps watch & procps ps ❌
./procps-4.0.4/bin/watch './procps-4.0.4/bin/ps aux | grep languagetool' Every 2.0s: ./procps-4.0.4/bin/ps aux | grep languagetool mathias+ 4056463 0.0 0.0 230836 3320 pts/32 S+ 23:31 0:00 ./procps-4.0.4/bin/watch ./procps-4.0.4/bin/ps aux | grep languagetool mathias+ 4056540 0.0 0.0 230836 1532 pts/32 S+ 23:32 0:00 ./procps-4.0.4/bin/watch ./procps-4.0.4/bin/ps aux | grep languagetool mathias+ 4056541 0.0 0.0 231736 3556 pts/32 S+ 23:32 0:00 sh -c -- ./procps-4.0.4/bin/ps aux | grep languagetool mathias+ 4056543 0.0 0.0 230732 2244 pts/32 S+ 23:32 0:00 grep languagetool procps watch & busybox ps ✅
./procps-4.0.4/bin/watch './busybox-1.36.1/bin/ps aux | grep languagetool' Every 2.0s: ./busybox-1.36.1/bin/ps aux | grep languagetool nixos: Mon Mar 17 23:33:31 2025 1026972 61534 39:38 java ...languagetool... 4056826 mathiass 0:00 ./procps-4.0.4/bin/watch ./busybox-1.36.1/bin/ps aux | grep languagetool 4056831 mathiass 0:00 ./procps-4.0.4/bin/watch ./busybox-1.36.1/bin/ps aux | grep languagetool 4056832 mathiass 0:00 sh -c -- ./busybox-1.36.1/bin/ps aux | grep languagetool 4056834 mathiass 0:00 grep languagetool Question
It seems odd that in every other case the commands behave as I expect them to, except when trying to use both ps and watch from procps. Does anybody know what is going on here?
/prcocps-4.0.4/bin/ps auxif so yes it of doesn't truncate, but it is hard to tell if/prcocps-4.0.4/bin/watch /prcocps-4.0.4/bin/ps auxtruncates or not because the first lines whatwatchdisplays aren't enough to determine that... But If it does or not, that still doesn't explain the behaviour above.