J'ai beaucoup de processus chromedriver, Il est très inefficace de tuer avec la commande kill dans l'ordre en utilisant le numéro de processus.
$ ps aux|grep chromedriver
yusaku 8013 0.0 0.1 4360484 12024 s001 S 1:01PM 0:00.22 /Users/yusaku/chromedriver --port=53472
yusaku 2932 0.0 0.1 4360484 11992 s001 S 12:25AM 0:00.25 /Users/yusaku/chromedriver --port=64392
yusaku 2880 0.0 0.1 4360484 11988 s001 S 12:25AM 0:00.26 /Users/yusaku/chromedriver --port=64302
yusaku 2512 0.0 0.1 4360484 12256 s001 S 12:07AM 0:00.28 /Users/yusaku/chromedriver --port=63331
yusaku 99432 0.0 0.1 4360620 12268 s001 S 8:08PM 0:00.36 /Users/yusaku/chromedriver --port=56561
yusaku 99261 0.0 0.1 4360620 12252 s001 S 7:59PM 0:00.48 /Users/yusaku/chromedriver --port=56221
yusaku 98284 0.0 0.1 4360620 12236 s001 S Sam 05PM 0:00.60 /Users/yusaku/chromedriver --port=55684
yusaku 98202 0.0 0.1 4360620 12240 s001 S Sam 05PM 0:00.43 /Users/yusaku/chromedriver --port=55487
yusaku 98120 0.0 0.1 4360620 12256 s001 S Sam 05PM 0:00.44 /Users/yusaku/chromedriver --port=55307
yusaku 98031 0.0 0.1 4360620 12320 s001 S Sam 05PM 0:00.33 /Users/yusaku/chromedriver --port=55113
yusaku 97976 0.0 0.1 4360484 12268 s001 S Sam 05PM 0:00.35 /Users/yusaku/chromedriver --port=55082
yusaku 97891 0.0 0.1 4360620 12540 s001 S Sam 05PM 0:00.51 /Users/yusaku/chromedriver --port=54923
yusaku 97807 0.0 0.1 4360620 12464 s001 S Sam 05PM 0:00.44 /Users/yusaku/chromedriver --port=54755
yusaku 97014 0.0 0.1 4360484 12004 s001 S Sam 04PM 0:00.34 /Users/yusaku/chromedriver --port=53365
yusaku 96928 0.0 0.1 4360484 11992 s001 S Sam 04PM 0:00.31 /Users/yusaku/chromedriver --port=53308
yusaku 96873 0.0 0.1 4360484 12000 s001 S Sam 04PM 0:00.31 /Users/yusaku/chromedriver --port=53169
yusaku 96811 0.0 0.1 4360484 12016 s001 S Sam 04PM 0:00.34 /Users/yusaku/chromedriver --port=53027
yusaku 95623 0.0 0.1 4360484 11984 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=52319
yusaku 95584 0.0 0.1 4360484 12012 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=52297
yusaku 95533 0.0 0.1 4360484 12012 ??S sam 15h 0:00.34 /Users/yusaku/chromedriver --port=52151
yusaku 95495 0.0 0.1 4360484 12000 ??S sam 15h 0:00.33 /Users/yusaku/chromedriver --port=52133
yusaku 95445 0.0 0.1 4360484 11988 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=51998
yusaku 95405 0.0 0.1 4360484 12000 ??S sam 15h 0:00.31 /Users/yusaku/chromedriver --port=51979
yusaku 95340 0.0 0.1 4360484 11976 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=51817
yusaku 95280 0.0 0.1 4360484 11984 ??S sam 15h 0:00.35 /Users/yusaku/chromedriver --port=51679
yusaku 95214 0.0 0.1 4360484 12004 ??S sam 15h 0:00.31 /Users/yusaku/chromedriver --port=51621
yusaku 95160 0.0 0.1 4360484 11996 ??S sam 15h 0:00.31 /Users/yusaku/chromedriver --port=51589
yusaku 95068 0.0 0.1 4360484 11984 ??S sam 15h 0:00.31 /Users/yusaku/chromedriver --port=51404
yusaku 95026 0.0 0.1 4360484 12008 ??S sam 15h 0:00.31 /Users/yusaku/chromedriver --port=51385
yusaku 94964 0.0 0.1 4360484 11972 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=51310
yusaku 94891 0.0 0.1 4360484 12008 ??S sam 15h 0:00.31 /Users/yusaku/chromedriver --port=51265
yusaku 94795 0.0 0.1 4368688 12228 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=50551
yusaku 94743 0.0 0.1 4360484 12280 ??S sam 15h 0:00.33 /Users/yusaku/chromedriver --port=50411
yusaku 94627 0.0 0.1 4360484 12272 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=50249
yusaku 94565 0.0 0.1 4360484 12284 ??S sam 15h 0:00.33 /Users/yusaku/chromedriver --port=50088
yusaku 94508 0.0 0.1 4360484 12260 ??S sam 15h 0:00.34 /Users/yusaku/chromedriver --port=49947
yusaku 94016 0.0 0.1 4360484 12244 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=49324
yusaku 93963 0.0 0.1 4360484 12248 ??S sam 15h 0:00.33 /Users/yusaku/chromedriver --port=49179
yusaku 93910 0.0 0.1 4360484 12204 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=65531
yusaku 93859 0.0 0.1 4360484 12232 ??S sam 15h 0:00.37 /Users/yusaku/chromedriver --port=65390
yusaku 93808 0.0 0.1 4360484 12220 ??S sam 15h 0:00.37 /Users/yusaku/chromedriver --port=65259
yusaku 93758 0.0 0.1 4360484 12212 ??S sam 15h 0:00.32 /Users/yusaku/chromedriver --port=65231
yusaku 93607 0.0 0.1 4360484 12236 ??S sam 15h 0:00.36 /Users/yusaku/chromedriver --port=64962
yusaku 11837 0.0 0.0 4277992 1008 s001 S+ 7:36PM 0:00.00 grep chromedriver
yusaku 11749 0.0 0.2 4360484 13808 s001 S 7:30PM 0:00.06 /Users/yusaku/chromedriver --port=58743
yusaku 11636 0.0 0.2 4360484 13836 s001 S 7:28PM 0:00.07 /Users/yusaku/chromedriver --port=58678
Vous pouvez tous les tuer en même temps en utilisant pgrep
et xargs
.
$ pgrep chromedriver| xargs kill -9
$
$ ps aux|grep chromedriver
yusaku 11934 0.0 0.0 4267752 1008 s001 S+ 7:48PM 0:00.01 grep chromedriver
Recommended Posts