Mangeshrex / rxfetch

A custom system info fetching tool
GNU General Public License v3.0
451 stars 39 forks source link

pgrep trouble #51

Closed polluks closed 1 year ago

polluks commented 2 years ago

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
Mangeshrex commented 2 years ago

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

polluks commented 2 years ago

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

Mangeshrex commented 2 years ago

try updating the procps-ng package

polluks commented 2 years ago

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?

Mangeshrex commented 2 years ago

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

proffapt commented 1 year ago

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.

alpheratz0 commented 1 year ago

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?