Wednesday, November 30, 2011

Linux Find Out Which Process Is Listening Upon a Port


Find Out Which Process Is Listening Upon a Port



1. Find process id

[root@node1 ~]# ps -ef| grep tfa
root      28422      1  0 08:37 ?        00:00:00 /bin/sh /etc/init.d/init.tfa run
root     101416      1 92 08:43 ?        00:09:55 /opt/oracle.ahf/jre/bin/java -server -Xms512m -Xmx1024m -Djava.awt.headless=true -Ddisable.checkForUpdate=true -XX:HeapDumpPath=/depot/TFA_DATA/oracle.ahf/data/node1/diag/tfa -XX:ParallelGCThreads=5 oracle.rat.tfa.TFAMain /opt/oracle.ahf/tfa
root     235621 204091  0 08:53 pts/8    00:00:00 grep tfa
[root@node1 ~]# netstat -tulpn | grep 292505




2. command to find port:
netstat -tulpn


e.g
[root@node1 ~]# netstat -tulpn | grep 250110
tcp        0      0 127.0.0.1:34149             0.0.0.0:*                   LISTEN      250110/java
tcp        0      0 10.118.50.98:5000           0.0.0.0:*                   LISTEN      250110/java

apt-key warning when sudo apt update run

Issue: apt-key warning when sudo apt update run Update below file: cat /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list ...