Chrome sucks

ps -e -m -o user,pid,args,%mem,rss | grep Chrome | perl -ne 'print "$1\n" if / (\d+)$/' | ( x=0;while read line; do (( x += $line )); done; echo $((x/1024)) );
How much memory is chrome sucking?
Sample Output

2013-05-07 22:50:44

3 Alternatives + Submit Alt

What Others Think

Not accurate. This command adds the RSS for each process, but in reality there is much overlap since chrome uses fork. Think of a Venn diagram - this command adds the area of each circle, but this counts the overlap multiple times. To see chrome's memory consumption, just enter the address "about:memory". Also, on my box the grep doesn't work because the process is "chrome" not "Chrome" (fixed by giving grep the "-i" option).
dstahlke · 446 weeks and 3 days ago
awk power ;) ps aux | awk '/chrome/ {m+=$6}END{print m/1024}';
DaSheep · 446 weeks and 2 days ago
These are both incorrect. They both have very different output but I don't have chrome running!
techie · 446 weeks and 1 day ago
I have been searching for it online for a few days but have not found it anywhere on this site. I distributed the link on social networks so that anyone can write my essay easily. Thanks for downloading this program.
CooperRaff · 43 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: