$ top -o cpu Processes: 318 total, 7 running, 11 stuck, 300 sleeping, 2181 threads 10:57:11 Load Avg: 3.82, 6.20, 6.94 CPU usage: 35.23% user, 5.81% sys, 58.95% idle SharedLibs: 16M resident, 10M data, 0B linkedit. MemRegions: 187449 total, 7337M resident, 52M private, 1115M shared. PhysMem: 16G used (2532M wired), 19M unused. VM: 703G vsize, 1063M framework vsize, 11083768(0) swapins, 16907853(0) swapouts Networks: packets: 17956740/12G in, 13426851/3518M out. Disks: 13779844/398G read, 14840307/588G written. PID COMMAND %CPU TIME #TH #WQ #PORT MEM PURG CMPRS PGRP 29634- Google Chrom 89.2 23:16:01 13 0 85 817M+ 0B 638M- 515 28991- Google Chrom 30.7 23:37:36 10/1 0 78 124M+ 0B 344M- 515 0 kernel_task 20.6 32:32:35 104/10 0 2 1685M+ 0B 0B 0 30147- Google Chrom 14.7 18:55:10 10 0 78 47M+ 0B 87M 515 609- Google Chrom 12.9 13:55:01 4/1 0 93 153M+ 0B 859M- 515 75040- Google Chrom 12.7 09:26:48 19 0 89 100M+ 0B 523M- 515 46990- Google Chrom 12.4 16:15:41 10 0 78 53M+ 0B 194M- 515 55854- Google Chrom 11.1 12:09:27 10 0 78 42M 0B 100M 515 79850- Google Chrom 11.0 02:49:58 10 0 78 44M 0B 91M 515 55744- Google Chrom 10.5 12:19:13 20 0 92 31M+ 0B 148M- 515 79625- Google Chrom 10.2 06:55:52 11 0 82 95M+ 0B 442M- 515 83785- Google Chrom 9.1 04:23:07 10/1 0 78 35M+ 0B 135M- 515 84883- Google Chrom 9.1 04:30:16 10/1 0 78 36M- 0B 71M- 515 190 WindowServer 8.8 14:29:00 5 1 1590- 44M- 8952K 628M 190 60247- Google Chrom 8.0 05:43:24 11/1 0 81 91M+ 0B 247M- 515
You can determine what web pages a Google Chrome process has open by putting
chrome://memory
in the Chrome address bar. Once you've identified
the relevant Chrome window/tabs associated with a process, you can close the
tab, or tabs, that may be associated with the process to reduce CPU usage.
If needed, you can also suspend a process
temporarily under OS X with the kill command.
If you only wanted to see the CPU usage for one particular Chrome process,
you can specify it with the -pid
option to the
top command. E.g., suppose
chrome://memory-redirect
, which is what will appear in the browser
address bar if you place chrome://memory
there after you hit
Enter, was showing the following information for one Chrome process:
PID | Name | Memory Resident |
Shared | Private | Virtual |
---|---|---|---|---|---|
75040 | Tab Classical Music Streaming Finding the proxy setting for Firefox from a command line |
128,996k | N/Ak | N/Ak | 2,211,888k |
I could view the fluctuating CPU usage by that particular process with a
PID of 75040 with top -pid 75040
$ top -pid 75040 Processes: 312 total, 2 running, 9 stuck, 301 sleeping, 2183 threads 20:46:23 Load Avg: 6.23, 6.18, 6.49 CPU usage: 15.79% user, 6.76% sys, 77.43% idle SharedLibs: 16M resident, 10M data, 0B linkedit. MemRegions: 177931 total, 6940M resident, 65M private, 1133M shared. PhysMem: 16G used (2509M wired), 20M unused. VM: 697G vsize, 1063M framework vsize, 13836973(0) swapins, 19593135(0) swapouts Networks: packets: 18081065/12G in, 13527483/3546M out. Disks: 14075128/414G read, 15118478/605G written. PID COMMAND %CPU TIME #TH #WQ #POR MEM PURG CMPRS PGRP PPID 75040- Google Chrom 8.3 09:53:20 19 0 89 75M+ 0B 499M- 515 515
You can also view CPU usage by Chrome using the Chrome Task Manager, which is available by clcking on Window at the top of a Chrome window and then selecting Task Manager. You can order the processes in order of CPU usage by clicking on the CPU column header.
If you click on the "Stats for nerds" link, you will see at the bottom of
the Task Manager window, a tab will be opened for
chrome://memory-redirect/
, i.e., the same display you will
see if you put chrome://memory
in the address bar of a tab.