rxfetch icon indicating copy to clipboard operation
rxfetch copied to clipboard

pgrep trouble

Open polluks opened this issue 1 year ago • 5 comments

pgrep from procps-ng 3.3.15

               os     Debian GNU/Linux 10 (buster) x86_64
               ker    4.4.0-19041-Microsoft
     •_•       pkgs   973
     oo|       sh     bash
    / '\'      ram    8223 / 17129 MB
   (\_;/)      init   init
pgrep: invalid option -- 'm'

Usage:
 pgrep [options] <pattern>

Options:
 -d, --delimiter <string>  specify output delimiter
 -l, --list-name           list PID and process name
 -a, --list-full           list PID and full command line
 -v, --inverse             negates the matching
 -w, --lightweight         list all TID
 -c, --count               count of matching processes
 -f, --full                use full process name to match
 -g, --pgroup <PGID,...>   match listed process group IDs
 -G, --group <GID,...>     match real group IDs
 -i, --ignore-case         match case insensitively
 -n, --newest              select most recently started
 -o, --oldest              select least recently started
 -P, --parent <PPID,...>   match only child processes of the given parent
 -s, --session <SID,...>   match session IDs
 -t, --terminal <tty,...>  match by controlling terminal
 -u, --euid <ID,...>       match by effective IDs
 -U, --uid <ID,...>        match by real IDs
 -x, --exact               match exactly with the command name
 -F, --pidfile <file>      read PIDs from file
 -L, --logpidfile          fail if PID file is not locked
 --ns <PID>                match the processes that belong to the same
                           namespace as <pid>
 --nslist <ns,...>         list which namespaces will be considered for
                           the --ns option.
                           Available namespaces: ipc, mnt, net, pid, user, uts

 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see pgrep(1).
               de/wm  unknown
               up     4 hours
               disk   24G / 200G

polluks avatar Jul 29 '22 11:07 polluks

can you elaborate the issue ? and sorry for the late reply

Mangeshrex avatar Aug 12 '22 04:08 Mangeshrex

My Buster has no option m pgrep from procps-ng 3.3.15

polluks avatar Aug 16 '22 08:08 polluks

try updating the procps-ng package

Mangeshrex avatar Aug 16 '22 09:08 Mangeshrex

well...

$ sudo apt upgrade procps
Reading package lists... Done
Building dependency tree
Reading state information... Done
procps is already the newest version (2:3.3.15-2).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

so I have to use unstable software?

polluks avatar Aug 17 '22 07:08 polluks

I have no idea cuz debian based distros are the only ones which are getting weird issues

Mangeshrex avatar Aug 19 '22 02:08 Mangeshrex

can fix this by using ps and then grep'ing it's output, non-suggested method.. but works since pgrep in macos (BSD version) has this same issue.

proffapt avatar Oct 08 '22 16:10 proffapt

I have no idea cuz debian based distros are the only ones which are getting weird issues

@Mangeshrex I'm using arch and pgrep doesn't support neither -m nor -e options, are you sure that the version of pgrep that you're using supports those options?

alpheratz0 avatar Jan 02 '23 00:01 alpheratz0