设置是,我现在在当前目录下有两个文件夹,busybox-1.36.1
和,并且我还有一个正在运行的procps-4.0.4
服务。现在观察不同的行为:languagetool
DynamicUser=yes
图例:✅ 不截断;❌ 截断。
busybox 手表 & 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 观看并 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 观看 & 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 监视 & 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
问题
奇怪的是,在其他所有情况下,命令的行为都符合我的预期,除了尝试同时使用ps
和watch
from 时procps
。有人知道这是怎么回事吗?