I need your help about port listeners


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting I need your help about port listeners
# 1  
Old 01-14-2010
Data I need your help about port listeners

Hi guys,

Im new on unix. but I need your help.
I have a windows program that is querying data from unix computer through winsock, this unix computer is bought from Japan in 1995. All the guys who are in charge of this have already resigned.
The problem is this winodws program is developed years ago i guess around 1995. this program is retrieving a data through this port 17477 from unix. But I didn't know what command should i throw to the listening port.

Code:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
prgsv 23208 root 3u inet 0x607e6cc8 0t0 TCP cen01:17477 (LISTEN)

Is there anyway that I will know what command the port is listening?

Last edited by pludi; 01-14-2010 at 04:18 AM.. Reason: code tags, please...
# 2  
Old 01-30-2010
If your Unix server has the command: lsof then run it on the Unix server as the root user as follows:
Code:
# lsof -i

This will list all the processes listening on TCP/IP ports and on what port they are listening on, e.g. on my machine I have the SSH daemon running that listens on port 22 so I get:
Code:
$ sudo lsof -i
[sudo] password for user: 
COMMAND    PID        USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd      1741        root    3u  IPv4   6946      0t0  TCP *:ssh (LISTEN)
sshd      1741        root    4u  IPv6   6949      0t0  TCP *:ssh (LISTEN)
$ ps -ef | grep 1741 | grep -v grep
root      1741     1  0 Jan30 ?        00:00:00 /usr/sbin/sshd
$ grep ssh /etc/services
ssh		22/tcp				# SSH Remote Login Protocol
ssh		22/udp
$

I have removed the other lines lof output for clarity.

So in your case if port 17477 is not listed in /etc/services than lsof will just show the port number, note the PID (1741 in my case) and grep for that pid from the ps list and you then know what application is listening on that port.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script, find the next closed (not in use) port from some port range.

hi, i would like to create a bash script that check which port in my Linux server are closed (not in use) from a specific range, port range (3000-3010). the print output need to be only 1 port, and it will be nice if the output will be saved as a variable or in same file. my code is: ... (2 Replies)
Discussion started by: yossi
2 Replies

2. 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

3. Solaris

Cabling and adapters to communicate to service processor serial port from Windows PC with USB port.

Hello, I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build. The first part is what confuses me -the cabling. I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies

4. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

5. Solaris

How to enable Serial port on ILOM, when Network Port is enabled in parallel

Hi Everyone, In my environment, I have few T5220. On the iLOM Management Card, I have both Network and Serial port are cabled, I don't have any issues while I try to connect using Network Management port, but when I try to connect the serial port for the same server which is actually connected... (3 Replies)
Discussion started by: bobby320
3 Replies

6. Shell Programming and Scripting

2 listeners in a port

Hi, Is it possible to have 2 programs to listen in 1 port? the only job of that other program is to record or monitor down any request it recieves to that specific port. Is that possible? Won't it cause any conflicts? (4 Replies)
Discussion started by: fif14344
4 Replies

7. Solaris

Enabling MQ Listeners

Hi I've been trying to change the services for MQ listeners using inetaconv and inetadm. The MQ was already installed and Im trying to change the QManager name. Ive creted the appropriate files (MQSeries-tcp.xml) and am now trying to enable MQSeries and then refresh the service: inetadm... (2 Replies)
Discussion started by: billy_mega
2 Replies

8. AIX

AIX listeners?

I have a file directory which I want to monitor - when a new file arrives I want to start a script. Are there any utilities which can do this (aside from DB2, Oracle, Websphere, etc). I just want a "simple" listener which will invoke a script. (2 Replies)
Discussion started by: edibob
2 Replies

9. IP Networking

RIP listeners

Hi! I have to find out if RIP listeners are enabled on some of UNIX servers. They are all running Tru64. Tnx! (1 Reply)
Discussion started by: veccinho
1 Replies
Login or Register to Ask a Question