Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I got an unexpected result:

For context

  pgrep --full /usr/lib/firefox/firefox | wc -l
returns 10, while

  pgrep 'firefox|Web' | wc -l
returns 9.

Your posted command formatted and a missing $ added (I'm using bash):

  echo 1024\*\
  $(\
    pgrep --full /usr/lib/firefox/firefox \
    | xargs pmap -x \
    | grep total \
    | awk '{print $5}'\
    | paste -sd+ - \
  )\
  | bc \
  | xargs ./human
returned 220.63 MiB.

Here's my htop excerpt:

  3532M  286M 97512 S  0.0  9.6  9:20.59 │  └─ /usr/lib/firefox/firefox
  2325M 74708 56596 S  0.0  2.4  0:00.42 │     ├─ /usr/lib/firefox/firefox -contentproc -childID 41
  2509M  121M 85300 S  0.0  4.1  0:15.84 │     ├─ /usr/lib/firefox/firefox -contentproc -childID 40
  2489M  173M  103M S  0.0  5.8  0:18.64 │     ├─ /usr/lib/firefox/firefox -contentproc -childID 39
  2389M 74172 57060 S  0.0  2.4  0:13.49 │     ├─ /usr/lib/firefox/firefox -contentproc -childID 23
  2540M  112M 89996 S  0.0  3.8  0:50.95 │     ├─ /usr/lib/firefox/firefox -contentproc -childID 22
  2513M 72396 58300 S  0.0  2.4  0:14.88 │     ├─ /usr/lib/firefox/firefox -contentproc -childID 17
  2413M 46488 34892 S  0.0  1.5  0:18.37 │     ├─ /usr/lib/firefox/firefox -contentproc -childID 16
   250M  2132  1916 S  0.0  0.1  0:00.13 │     ├─ /usr/lib/firefox/firefox -contentproc -parentBuil
  26.4G 85844 35008 S  0.0  2.8  0:57.39 │     └─ /usr/lib/firefox/firefox -contentproc -childID 3 
Not sure what to make of it.


To capture the other processes pgrep 'firefox|Web' to capture WebExtensions and Web Content


That's what I'm talking about in the beginning of the post. 'firefox|Web' captures 1 one less process than `--full /usr/lib/firefox/firefox`. That one process is 0.1mb in my case.


I didn't know about --full you are correct




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: