1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

実行途中のプロセスがどれがどれだかわからない時

Last updated at Posted at 2025-05-14

※メモです

現在実行中のプロセスの一覧を表示した際に、同一ファイル名だけど中身を変えてしまった時どう見分けるかというと

$ ps x | grep python
1225995 pts/12   S+     0:00 grep --color=auto python
3262535 pts/27   Rl   28426:13 python gemma3/pks_benchmark_rev2.py
3272838 ?        Rl   27801:18 python gemma3/pks_benchmark_rev2.py

下記のコマンドを行うと

$ ls -l /proc/3262535(プロセス番号)/fd

下記のようにファイルがどこに何を書き込んだのかとかのログが出てくるので、もし出力をoutput.logとかに格納していたら、そこに書き込んでる履歴があるかなどを見れば識別可能!

l-wx------. 1 user users 64 May 14 03:52 25 -> /home/yi10/.vscode-server/data/logs/20250512T201416/remoteagent.log
lrwx------. 1 user users 64 May 14 03:52 26 -> /dev/nvidia2
lrwx------. 1 user users 64 May 14 03:52 27 -> /dev/nvidia3
lrwx------. 1 user users 64 May 14 00:04 28 -> /dev/nvidia3
lrwx------. 1 user users 64 May 14 00:04 29 -> /dev/nvidia4
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?