Finding port number !!


 
Thread Tools Search this Thread
Operating Systems Solaris Finding port number !!
# 1  
Old 10-03-2008
Finding port number !!

Hi all ,

I want know the port no on which a particular application is running.

How to find that?

Thanks in anticipation
# 2  
Old 10-03-2008
If you have lsof, that is often a good tool for this.
# 3  
Old 10-03-2008
Try using lsof. lsof -i | grep -i listen should get what you're looking for. You may also grep for a pid or port number too if you're looking for something specific.
What does port number [whatever] mean?
# 4  
Old 10-03-2008
I tried location the same in different post and got couple of answer also as user
Quote:
# lsof

1. I am using Solaris 10 - Solaris 10 5/08 s10s_u5wos_10 SPARC
2. i am unable to get the above command

Quote:
# netstat –a
I did tried and got the output, now I am confused . While executing

Quote:
#netstat –a |grep telnet
I got below as output

Quote:
*.telnet *.* 0 0 49152 0 LISTEN
172.24.1.168.telnet 10.10.108.169.1499 63310 1 49640 0 ESTABLISHED
*.telnet *.* 0 0 49152 0 LISTEN
Which is port number in above ?
# 5  
Old 10-03-2008
Thanks Guys

I do not have lsof , is this is a part of some add on package ?
# 6  
Old 10-03-2008
Actually ".telnet" is the "port number". You can look up the numeric port number in /etc/services

LISTEN is the server which is running all the time and accepting incoming connections.
# 7  
Old 10-03-2008
Thanks era,

Please tell me what is the difference between /etc/services port number and the one I am getting through nestata –a

Quote:
#grep telnet /etc/services
telnet 23/tcp
and

Quote:
# netstat -a|grep telnet
*.telnet *.* 0 0 49152 0 LISTEN
172.24.1.168.telnet 10.10.108.169.1499 63211 1 49640 0 ESTABLISHED
*.telnet *.* 0 0 49152 0 LISTEN
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

2. SCO

Problem finding what is using a serial port

How can I determine what process is currently using a serial port? A good bit of google searching hasn't turned up anything useful, but it seems like there has to be a way to do this without too much difficulty. When I first started looking into this problem, I assumed that when a port was in... (2 Replies)
Discussion started by: jdsnatl
2 Replies

3. AIX

Finding service based on port number

is it possible to find out which Service is running on the basis of port no which is open/listening? Regards Manoj (2 Replies)
Discussion started by: manoj.solaris
2 Replies

4. Shell Programming and Scripting

Need help in finding and replacing port numbers.

Hi All, I am trying to write a shell script which firstly will search some files and then increase the port numbers mentioned in them by a certain no. let me clear it with an example- suppose there r few files a,b,c,d.... file a's content- <serverEntries xmi:id="ServerEntry_1"... (3 Replies)
Discussion started by: ankushsingh10
3 Replies

5. UNIX for Dummies Questions & Answers

port number

hi all i want to connect a system, how can i know the port number of a system. (2 Replies)
Discussion started by: tukuna82
2 Replies

6. UNIX for Dummies Questions & Answers

Need to know port number

Hi expert, I wanted to know in which port my apache is running in solaris box thanks Shaan (1 Reply)
Discussion started by: shaan_dmp
1 Replies

7. Shell Programming and Scripting

port number as an argument

What is the script that takes a port number as parameter and displays status, whether it is available or is already used by other process pls help (1 Reply)
Discussion started by: saikiran
1 Replies

8. IP Networking

finding port numbers

hither! whatz the command to find which process is using a specific port number? for example, port 8082? (3 Replies)
Discussion started by: darkcastle
3 Replies

9. UNIX for Advanced & Expert Users

finding a process running on a port

how do I find the process that is running on a port in HP-Unix? Murali (8 Replies)
Discussion started by: manduva
8 Replies

10. Cybersecurity

get number of a port

Hello every one. I work in a LAN with many application server. Each one use a different port. What command permit to obtain the number of these port. thanks (2 Replies)
Discussion started by: hoang
2 Replies
Login or Register to Ask a Question