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.
Re:Firefox 73
by michaelmrose on Wednesday February 12, 2020 @01:08PM
(#22311103)
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.
Re:Firefox 73
by michaelmrose on Monday February 17, 2020 @06:27PM
(#22351927)
I didn't know about --full you are correct
Here is how it looks on my system.
Here is a bit of bash to turn a number of bytes into a human readable label shamelessly stolen from somewhere saved as human Here is the best formulation of finding the memory usage of foo where foo can be a regular expression In fish the meminfo function with custom functions not herein included Most of firefox's mememory is in firefox, Web Content, and WebExtensionsmeminfo firefox returns only 250MB right now but meminfo 'firefox|Web' returns 1.5GB
If you are looking at just firefox you are definitely not getting the whole picture.