I have some web applications that I wrote with python flask. I know which port I started each one on and each was started using nohup. Each one was started with something like
nohup python mywebapp.py &
When I look at my processes with
ps, I only see something like
36697 ? 60-21:36:16 python 36971 ? 63-19:11:43 python 37038 ? 65-06:57:22 python 37312 ? 54-23:33:16 python 37442 ? 54-09:14:57 python 37716 ? 47-19:45:17 python 68019 ? 00:29:24 python 146568 ? 00:20:57 python 146699 ? 00:17:08 python 150622 ? 00:32:20 python
If I need to stop one particular web application, how can I get from a port number back to a python process id so that I can
kill the process?