3

pgrep on a Ubuntu 19.10 matches on a cmd line of about 10000 characters just fine, but the same version (see below) of pgrep on Debian 10 (buster) greps only on the first 4096 characters.

Is there a way to make the Debian version match on the whole cmd line or would this require recompilation?

$ pgrep --version
pgrep from procps-ng 3.3.15

Update 'ps -ef' does not have the 4096 char limit.

Evgeniy Berezovsky
  • 775
  • 1
  • 7
  • 20
  • Does this answer your question? [ps only prints up to 4096 characters of any process's command line](https://unix.stackexchange.com/questions/343353/ps-only-prints-up-to-4096-characters-of-any-processs-command-line) – muru Mar 03 '20 at 02:38
  • Wouldn't help even if you recompiled `pgrep` - the limit comes from `/proc//cmdline`. – muru Mar 03 '20 at 02:38
  • 1
    No, I was wrong: the limit is from `pgrep`: https://gitlab.com/procps-ng/procps/-/commit/f9e56d3c667513d96b798340f7b7c1b40096f084 – muru Mar 03 '20 at 02:44
  • I noticed this limit of pgrep (and pkill) are affecting me on Fedora 31, too. It's quite frustrating. This limit of pgrep seems unnecessary, and I can't figure out a workaround other than editing the source and recompiling. – Christopher Mar 20 '20 at 06:06

0 Answers0