As you know, you can string Linux commands together to achieve larger and more complicated tasks. Here we will look at locating processes that are connecting over the network. We will see how to locate established and listening endpoints.
We will also print process trees to understand how Apache2 forks processes to do load balancing of network connections.
First, let’s check all open files that are Internet addresses. All network connections will be identified by a network file (such as an Internet socket, which we are interested in here).