Sep 3, 2003 #1 bandez IS-IT--Management Jul 8, 2002 42 GB Hello, How can I know to which port belongs to which process? E.g : netstat -a said: udp4 0 0 *.54263 *.* Which process listen on 54263? Thanks !!
Hello, How can I know to which port belongs to which process? E.g : netstat -a said: udp4 0 0 *.54263 *.* Which process listen on 54263? Thanks !!
Sep 3, 2003 #2 Morsing Technical User Jun 25, 2002 881 GB lsof -i 54263 Cheers Henrik Morsing Certified AIX 4.3 Systems Administration & p690 Technical Support Upvote 0 Downvote
lsof -i 54263 Cheers Henrik Morsing Certified AIX 4.3 Systems Administration & p690 Technical Support
Sep 3, 2003 Thread starter #3 bandez IS-IT--Management Jul 8, 2002 42 GB ok ok but without lsof ? Upvote 0 Downvote
Sep 3, 2003 #4 sushveer Technical User Jun 20, 2003 176 US Hi bandez Here is a small script to find any port(listening) versus process #!/bin/ksh #script title=/tmp/port-process.ksh netstat -a|grep LISTEN|awk {print $4}>/tmp/port.list for PORT in `cat /tmp/port.list` do /usr/sbin/lsof -i | grep $PORT done echo "script exection $0 completed" sushveer IBM certified specialist-p-series AIX5L System Administration AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator Upvote 0 Downvote
Hi bandez Here is a small script to find any port(listening) versus process #!/bin/ksh #script title=/tmp/port-process.ksh netstat -a|grep LISTEN|awk {print $4}>/tmp/port.list for PORT in `cat /tmp/port.list` do /usr/sbin/lsof -i | grep $PORT done echo "script exection $0 completed" sushveer IBM certified specialist-p-series AIX5L System Administration AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
Sep 3, 2003 #5 sushveer Technical User Jun 20, 2003 176 US Hi bandez Here is a small script to find any port(listening) versus process #!/bin/ksh #script title=/tmp/port-process.ksh netstat -a|grep LISTEN|awk '{print $4}'>/tmp/port.list for PORT in `cat /tmp/port.list` do /usr/sbin/lsof -i | grep $PORT done echo "script exection $0 completed" This is tested and works fine..No probs! sushveer IBM certified specialist-p-series AIX5L System Administration AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator Upvote 0 Downvote
Hi bandez Here is a small script to find any port(listening) versus process #!/bin/ksh #script title=/tmp/port-process.ksh netstat -a|grep LISTEN|awk '{print $4}'>/tmp/port.list for PORT in `cat /tmp/port.list` do /usr/sbin/lsof -i | grep $PORT done echo "script exection $0 completed" This is tested and works fine..No probs! sushveer IBM certified specialist-p-series AIX5L System Administration AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator