Giter Club home page Giter Club logo

Comments (13)

dalance avatar dalance commented on June 22, 2024 1

I tried to fix PID0. Could you try v0.8.16?

from procs.

gordonhart avatar gordonhart commented on June 22, 2024 1

v0.8.16 has fixed the issue with PID0:

            PID   User                   │ State Nice TTY   CPU  MEM  VmSize    VmRSS TCP                  UDP                    Read Write Parent PID │ CPU Time Start            │ Command
                                         │                  [%]  [%] [bytes]  [bytes]                                            [B/s] [B/s]            │                           │
 ├┬──────── 0     root                   │ U        0       1.5 20.8 73.778G   3.335G []                   []                        0     0          0 │ 18:22:44 2019/10/24 15:48 │
 │└┬─────── 1     root                   │ S        0       0.0  0.1  4.177G  16.324M [22]                 [137, 138]                0     0          0 │ 02:04:35 2019/10/24 15:48 │ /sbin/launchd
 ...

from procs.

dalance avatar dalance commented on June 22, 2024

Thank you for your report.
I tried to reproduce it on Travis-CI and Azure Pipelines (I don't have macOS device), but both work fine.

Could you send the result of sudo procs?

from procs.

elyscape avatar elyscape commented on June 22, 2024

I’m not at my computer at the moment, but that works fine and shows the expected output.

from procs.

gordonhart avatar gordonhart commented on June 22, 2024

Confirming the same issue with version 0.8.14 recently installed by Homebrew (on macOS Catalina):

$ which procs
/usr/local/bin/procs
$ procs --version
procs 0.8.14
$ sudo procs -t
  PID User │ State Nice TTY CPU MEM  VmSize   VmRSS TCP UDP  Read Write │ CPU Time Start │ Command
           │                [%] [%] [bytes] [bytes]         [B/s] [B/s] │                │ 

from procs.

dalance avatar dalance commented on June 22, 2024

@gordonhart Thank you for the information. Could you send the result of procs --insert ppid?

from procs.

gordonhart avatar gordonhart commented on June 22, 2024

The provided command worked as expected, with or without --tree, as a normal user. Also worked without --tree as superuser. However, got this same empty table when running as superuser with --tree:

$ sudo procs --insert ppid -t
  PID User │ State Nice TTY CPU MEM  VmSize   VmRSS TCP UDP  Read Write Parent PID │ CPU Time Start │ Command
           │                [%] [%] [bytes] [bytes]         [B/s] [B/s]            │                │

from procs.

dalance avatar dalance commented on June 22, 2024

Is sudo procs --insert ppid empty? If not, I want to see Parent PID column.

from procs.

gordonhart avatar gordonhart commented on June 22, 2024

sudo procs --insert ppid appears to be fully functional. The PPID column is populated as expected, verified for a number of cases by manual inspection via ps.

from procs.

dalance avatar dalance commented on June 22, 2024

Tree view is constructed from PID and PPID, so I want to see PID and PPID list.

from procs.

gordonhart avatar gordonhart commented on June 22, 2024

Both appear to be working fine with sudo procs --insert ppid, but just to confirm, here's a relatively innocuous slice of the output of that command:

 PID:▲ User                   │ State Nice TTY    CPU  MEM  VmSize    VmRSS TCP                  UDP                   Read Write Parent PID │ CPU Time Start            │ Command
                              │                   [%]  [%] [bytes]  [bytes]                                           [B/s] [B/s]            │                           │
 0     root                   │ U        0        3.0 17.9 73.802G   2.861G []                   []                       0     0          0 │ 17:48:27 2019/10/24 15:48 │
 1     root                   │ S        0        0.0  0.1  4.176G  16.895M [22]                 [137, 138]               0     0          0 │ 01:58:44 2019/10/24 15:48 │ /sbin/launchd
 122   root                   │ S        0        0.0  0.0   4.15G     740K []                   [60765]                  0     0          1 │ 00:02:13 2019/10/24 15:48 │ /usr/sbin/syslogd
 123   root                   │ S        0        0.0  0.0  4.179G   5.875M [49156, 49157, 49158 []                       0     0          1 │ 00:11:28 2019/10/24 15:48 │ /usr/libexec/UserEventAgent (System)
 126   root                   │ S        0        0.0  0.0  4.117G     468K []                   []                       0     0          1 │ 00:00:41 2019/10/24 15:48 │ /System/Library/PrivateFrameworks/Uninstall.framework/Resources/uninstalld
 127   root                   │ S        0        0.0  0.0  4.666G   1.695M []                   []                       0     0          1 │ 00:03:50 2019/10/24 15:48 │ /usr/libexec/kextd
 128   root                   │ S        0        0.0  0.0  4.171G   2.945M []                   []                       0     0          1 │ 00:34:48 2019/10/24 15:48 │ /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/Support/fseventsd
...
 50178 gordonhart             │ S        0        0.0  2.8  6.245G 462.168M []                   []                       0     0          1 │ 04:55:58 2019/11/24 06:28 │ /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
 50181 gordonhart             │ S        0        0.0  0.0  4.152G     704K []                   []                       0     0          1 │ 00:00:00 2019/11/24 06:29 │ /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/78.0.3904.108/Helpers/chrome_crashpad_handler --monitor-self-annotation=ptype=crashpad-handler --database=/Users/gordonhart/Library/Application Support/Google/Chrome/Crashpad
 50184 gordonhart             │ S        0        0.0  1.0   7.04G 163.496M []                   []                       0     0      50178 │ 02:07:47 2019/11/24 06:29 │ /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/78.0.3904.108/Helpers/Google Chrome Helper (GPU).app/Contents/MacOS/Google Chrome Helper (GPU) --type=gpu-process
 50185 gordonhart             │ S        0        4.3  0.7  4.504G 112.539M []                   [5353, 49213, 54581,     0     0      50178 │ 01:51:24 2019/11/24 06:29 │ /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/78.0.3904.108/Helpers/Google Chrome Helper.app/Contents/MacOS/Google Chrome Helper --type=utility --lang=en-US --service-sandbox-type=network --seatbelt-client=38
 50188 gordonhart             │ S        0        0.0  0.0  4.141G      12K []                   []                       0     0          1 │ 00:00:00 2019/11/24 06:29 │ /Applications/Google Chrome.app/Contents/Frameworks/Google Chrome Framework.framework/Versions/78.0.3904.108/XPCServices/AlertNotificationService.xpc/Contents/MacOS/AlertNotificationService
...

from procs.

dalance avatar dalance commented on June 22, 2024

Thanks. The cause seems to be PID:0, PPID:0.
I fixed and released v0.8.15. Could you try it?
(Release build will be completed within about 10 minutes)

from procs.

gordonhart avatar gordonhart commented on June 22, 2024

The fix included in v0.8.15 appears to have done the trick. Thanks for the fast patch! procs is an awesome tool.

One minor thing to note: PID0 has been removed from the list in tree view so PID1 starts with a "child" tree indicator pointing to an absent parent:

            PID   User                   │ State Nice TTY   CPU MEM  VmSize    VmRSS TCP                  UDP                     Read Write │ CPU Time Start            │ Command
                                         │                  [%] [%] [bytes]  [bytes]                                             [B/s] [B/s] │                           │
 └┬──────── 1     root                   │ S        0       0.0 0.1  4.176G  17.367M [22]                 [137, 138]                 0     0 │ 01:59:12 2019/10/24 15:48 │ /sbin/launchd
  ├──────── 122   root                   │ S        0       0.0 0.0  4.151G     732K []                   [60438]                    0     0 │ 00:02:13 2019/10/24 15:48 │ /usr/sbin/syslogd
...

from procs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.