Sponsored Content
Top Forums Shell Programming and Scripting I need your help about port listeners Post 302391177 by TonyFullerMalv on Saturday 30th of January 2010 08:46:23 PM
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.
 

9 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

9. 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
asadmin-delete-iiop-listener(1AS)				   User Commands				 asadmin-delete-iiop-listener(1AS)

NAME
asadmin-delete-iiop-listener, delete-iiop-listener - removes the IIOP listener SYNOPSIS
delete-iiop-listener --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false ] [--echo=false ] [--interactive=true ] listener_ID Removes the IIOP listener. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. OPERANDS
listener_id unique identifier for the IIOP listener to be deleted. Example 1: Using delete-iiop-listener asadmin> delete-iiop-listener --user admin --password adminadmin --host fuyako --port 7070 sample_iiop_listener Command delete-iiop-listener executed successfully Where: sample_iiop_listener is the IIOP listener deleted. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-iiop-listener(1AS), asadmin-list-iiop-listeners(1AS) J2EE 1.4 SDK March 2004 asadmin-delete-iiop-listener(1AS)
All times are GMT -4. The time now is 06:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy