adding TCP Kill
parent
1fa9f17723
commit
ed957ddf33
2 changed files with 31 additions and 0 deletions
30
TCP-Kill.md
Normal file
30
TCP-Kill.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
## Killing a stalled TCP connection
|
||||
|
||||
Requires: kernel >= 4.9 with `CONFIG_INET_DIAG_DESTROY`
|
||||
|
||||
Scenario: subprocess `rclone` has encountered trouble and started to stall out, running at a severely decreased rate of speed
|
||||
|
||||
Task: pause rclone, kill the in-progress TCP connection, resume rclone which will trigger it to (re)create a new, working TCP connection (app dependent)
|
||||
|
||||
### Steps
|
||||
|
||||
Find the process and it's TCP stalled connection:
|
||||
|
||||
```
|
||||
$ ps axo pid,comm | grep [r]clone
|
||||
6874 rclone
|
||||
|
||||
$ ss -ntp | grep [r]clone | awk '{print $5, $6}'
|
||||
74.120.9.121:443 users:(("rclone",pid=6874,fd=9))
|
||||
```
|
||||
|
||||
Pause the process, kill the connection (as root), resume the process:
|
||||
|
||||
```
|
||||
$ kill -STOP 6874
|
||||
|
||||
$ sudo ss -K dst 74.120.8.14 dport 443
|
||||
|
||||
$ kill -CONT 6874
|
||||
```
|
||||
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
- [[Smem Datamash]]
|
||||
- [[Split Disk]]
|
||||
- [[systemd PID1]]
|
||||
- [[TCP Kill]]
|
||||
- [[Thunderbird LDAP AD]]
|
||||
- [[uBlock Filters]]
|
||||
- [[udev Hide Partitions]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue