netstat – Network Statistics
This command is used to display all the network connections, routing tables and number of network interface.
Example: The below command list all the java instance running on the system
# netstat --all --programs --numeric | grep java
# netstat –apn | grep java
# netstat –apn | grep java
How to check whether the specific port is listening on the system?
# netstat --listening --numeric –programs | grep port_number
Example: To check whether 8080 port is listening
# netstat --listening --numeric –programs | grep 8080
# nestat –lnp | grep 8080
# nestat –lnp | grep 8080
Some important options in netstat command
# netstat --all
# netstat --route
# netstat --interfaces
# netstat --route
# netstat --interfaces