LoginSignup
0
0

More than 5 years have passed since last update.

プロセスを切る

Last updated at Posted at 2017-02-02

:cat:プロセスを切る

サーバー上で以下を実行

$ sudo netstat -ntlp

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      15502/python
tcp6       0      0 :::111                  :::*                    LISTEN      -
tcp6       0      0 :::80                   :::*                    LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 ::1:25                  :::*                    LISTEN      -

探していたpythonのジョブを発見!! PIDがのっているのでkill:beer:

$ kill -9 15502

もしくは別の方法で、以下のコマンドで探す

$ ps aux grep | python
python のところは各人が起動していると思っているジョブを入力

PID名が出るのでkill:beer:

これでもPIDが出ない場合

ポートから探す
$ lsof -i -P | grep 8000

PID名が出るので今度こそkill :tada:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0