# End session request

**URL:** <https://support.prodi.gy/t/end-session-request/1865>\
**Category:** Uncategorized\
**Tags:** usage, api, solved\
**Created:** [August 3, 2019, 8:18pm UTC](https://support.prodi.gy/t/end-session-request/1865 "2019-08-03T20:18:25Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![atilla](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/atilla/32/927_2.png) [@atilla](https://support.prodi.gy/u/atilla)\
**Post date:** [August 4, 2019, 2:55pm UTC](https://support.prodi.gy/t/end-session-request/1865/5 "2019-08-04T14:55:48Z")

</div>

Cool, thanks! I have used this approach described in the first link you have shared:

```python
from psutil import process_iter
from signal import SIGTERM # or SIGKILL

for proc in process_iter():
    for conns in proc.connections(kind='inet'):
        if conns.laddr.port == 8080:
            proc.send_signal(SIGTERM) # or SIGKILL

```

Just needed to run the .py file with sudo in the first place, then it worked perfectly. I'll check your jupyterlab approach as well, it looks more elegant. Congrats by the way for this amazing extension and please keep up good work.

---

_[View the full topic](https://support.prodi.gy/t/end-session-request/1865)._
