pgrep 不搜索长(超过 15 个字符)进程名称

pgrep does not search for long (more than 15 chars) process name

我的进程名称是core-plugin-loader

core-plugin-loader --file=/usr/lib/blah.so &

pi@kyb-pi4 /usr> pgrep core-plugin-loader
pi@kyb-pi4 /usr> pgrep core-plugin-loa
13892
pi@kyb-pi4 /usr> pgrep -a core-plugin-loa
13892 core-plugin-loader --file=/usr/lib/blah.so
pi@kyb-pi4 /usr> pgrep -a core-plugin-loader

版本:

pgrep from procps-ng 3.3.15

> head -1 /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"

看起来很奇怪。如何为 pgrep 解决此问题?

Here是关于线程名称的Q。但是我要进程名。

这似乎在 man pgrep :

NOTES

The process name used for matching is limited to the 15 characters present in the output of /proc/pid/stat. Use the -f option to match against the complete command line, /proc/pid/cmdline.