Sometimes I need to kill an established TCP session especially the long time running TCP connections that doing barely nothing, without killing the process that opens it.

As a typical use case for troubleshooting, we may need to find out the up time of an established socket connection. Well, how can we do that inside a running Linux system? I faced this issue this afternoon, and got…

Lsof is used to list open files. Lsof follows Unix philosophy closely. It does just one task and it does it perfectly — it lists information about opened files in a running system. An open file can be a regular file,…