进程 - 如何停止不断增加的Google Chrome 后台进程?

分享于 

7分钟阅读

ubuntu

  繁體

问题


$ ps -ef | grep chrome


ak 4044 1 4 11:30 ? 00:00:01 /opt/google/chrome/google-chrome


ak 4047 4044 0 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4049 1 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=zygote


ak 4139 4044 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/home/ak/.config/google-chrome/Default/Extensions/cpngackimfmofbokmjmljamhdncknpmg/3.0.7_0/plugin/screen_capture_64.so --lang=en-US --plugin-data-dir=/home/ak/.config/google-chrome/Default --channel=4044.0x618d838.1464152706 --enable-crash-reporter=D8EC5832E6B1783FEA1F118FC4B1AAE0,Ubuntu 10.10


ak 4150 1 3 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4153 4150 0 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4155 1 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=zygote


ak 4244 4150 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/home/ak/.config/google-chrome/Default/Extensions/cpngackimfmofbokmjmljamhdncknpmg/3.0.7_0/plugin/screen_capture_64.so --lang=en-US --plugin-data-dir=/home/ak/.config/google-chrome/Default --channel=4150.0x48c1e38.1952918361 --enable-crash-reporter=D8EC5832E6B1783FEA1F118FC4B1AAE0,Ubuntu 10.10


ak 4253 1 6 11:30 ? 00:00:01 /opt/google/chrome/google-chrome


ak 4256 4253 0 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4258 1 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=zygote


ak 4348 4253 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/home/ak/.config/google-chrome/Default/Extensions/cpngackimfmofbokmjmljamhdncknpmg/3.0.7_0/plugin/screen_capture_64.so --lang=en-US --plugin-data-dir=/home/ak/.config/google-chrome/Default --channel=4253.0x598ca38.734301885 --enable-crash-reporter=D8EC5832E6B1783FEA1F118FC4B1AAE0,Ubuntu 10.10


ak 4355 1 4 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4358 4355 0 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4360 1 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=zygote


ak 4449 4355 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/home/ak/.config/google-chrome/Default/Extensions/cpngackimfmofbokmjmljamhdncknpmg/3.0.7_0/plugin/screen_capture_64.so --lang=en-US --plugin-data-dir=/home/ak/.config/google-chrome/Default --channel=4355.0x4bb6e38.554350998 --enable-crash-reporter=D8EC5832E6B1783FEA1F118FC4B1AAE0,Ubuntu 10.10


ak 4457 1 5 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4460 4457 0 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4462 1 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=zygote


ak 4553 4457 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/home/ak/.config/google-chrome/Default/Extensions/cpngackimfmofbokmjmljamhdncknpmg/3.0.7_0/plugin/screen_capture_64.so --lang=en-US --plugin-data-dir=/home/ak/.config/google-chrome/Default --channel=4457.0x5338c38.1605325542 --enable-crash-reporter=D8EC5832E6B1783FEA1F118FC4B1AAE0,Ubuntu 10.10


ak 4559 1 8 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4562 4559 0 11:30 ? 00:00:00 /opt/google/chrome/google-chrome


ak 4564 1 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=zygote


ak 4653 4559 0 11:30 ? 00:00:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/home/ak/.config/google-chrome/Default/Extensions/cpngackimfmofbokmjmljamhdncknpmg/3.0.7_0/plugin/screen_capture_64.so --lang=en-US --plugin-data-dir=/home/ak/.config/google-chrome/Default --channel=4559.0x60e6638.1319164624 --enable-crash-reporter=D8EC5832E6B1783FEA1F118FC4B1AAE0,Ubuntu 10.10


ak 4661 4020 0 11:30 pts/2 00:00:00 grep --color=auto chrome



如果在出现Chrome时尝试启动它们,将显示以下错误消息:

your profile could not be opened correctly.

some features may be unavailable. please check that the profile exists and you have permission to read and write its contents.

如何摆脱这些限制以使Chrome重新启动?


$ killall google-chrome


google-chrome: no process found




$ kill 4044 4047 4049 4139 4150 4153 4155 4244 4253 4256 4258 4348 4355 4358 4360 4449 4457 4460 4462 4553 4559 4562 4564 4653


$ !!


kill 4044 4047 4049 4139 4150 4153 4155 4244 4253 4256 4258 4348 4355 4358 4360 4449 4457 4460 4462 4553 4559 4562 4564 4653


bash: kill: (4139) - No such process


bash: kill: (4244) - No such process


bash: kill: (4348) - No such process


bash: kill: (4449) - No such process


bash: kill: (4553) - No such process


bash: kill: (4653) - No such process




答案1

pgrep chrome | xargs kill #这是pkill Chrome"

做同样的事情,但中间要休眠1/3秒:


for i in `pgrep chrome` ; do kill $i ; sleep .33 ; done



继续杀直到杀死:


while pgrep chrome ; do pkill chrome ; done



Short和sweet (但在手动退出之前不会退出):


watch pkill chrome 



可能有效:


for i in `pgrep chrome` ; do kill $i && wait $i ; sleep .33 ; done




答案2

重新打开... ",那么仅发送chrome进程树的根信号非常重要,如下所示:


pkill --oldest chrome



参见完整解释


答案3

你可以尝试:

 
pkill chrome




答案4

我认为并非都是进程,而是线程。

你试试killall -15 google-chrome chrome 这会杀死所有SIGTERM信号的google chrome进程和线程。如果这不能工作,你可以尝试killall -9 google-chrome chrome ,除非你绝对需要杀死没有保存数据的进程,否则强烈建议不要这样做)


答案5


sudo killall chrome





acc  PROC  CHR  chrome  后台  Google Chrome