Monday, 20 December 2010

How2 list ports and open files & Ports used by process

List of open files & ports used by process:

  • lsof -n -P -p process_id
  • lsof -i | grep process_name
List of open ports on the current machine

  • netstat -a

Find process: mongodb & the port it has open:

  • netstat -tapn | grep mongo
Firewall: see iptables

No comments:

Post a Comment