What is the Listen Address of my process ?


 
Thread Tools Search this Thread
Operating Systems HP-UX What is the Listen Address of my process ?
# 1  
Old 02-21-2013
What is the Listen Address of my process ?

Hi,

We cant set the listen address of my java process to the IP address or any of the DNS names listen in the hosts file of the server.

We can access the resources of the pid in the web browser through
Code:
http://<IP / DNS>:port/console

Based on the pid, how can we find what is the listen address of my process ? Is it the IP address or the DNS?
# 2  
Old 02-21-2013
'lsof' will tell you. Usually listeners bind to a specific port, or use getsocketname to acquire their own port and send it to a correspondent, like in passive FTP.

As far as IP goes, you can listen on 0.0.0.0 = any, localhost 127.0.0.1, any IP of devices on your host. Otherwise, you get nothing.
# 3  
Old 02-22-2013
Wrench

Quote:
Originally Posted by DGPickett
'lsof' will tell you. Usually listeners bind to a specific port, or use getsocketname to acquire their own port and send it to a correspondent, like in passive FTP.

As far as IP goes, you can listen on 0.0.0.0 = any, localhost 127.0.0.1, any IP of devices on your host. Otherwise, you get nothing.
I'm sorry for not being more specific in my query.

The concern is while configuring the server if I specify the DNS name then
Code:
http://<IP>:port/console

Does not yeild the webpage and visa-versa. So i have to know using the pid is the server is listening on the DNS name, if so what is it and if it is listening on the IP address and what it is.
# 4  
Old 02-22-2013
The server will definitely not listen on the DNS name but on IP address (numbers). Anything having to do with server/domain names is the part of DNS services, even if you see names in some listings.
You may well have a problem with DNS, though.
This User Gave Thanks to RudiC For This Post:
# 5  
Old 02-22-2013
Are you talking about one server pretending to be many? It depends on the HTTP Header referring page or original host name to decide which server to pretend to be, no magic, and with IP it must default.
# 6  
Old 02-25-2013
Hammer & Screwdriver

How can i store the Listen IP address to a bash variable given a particular pid ?

I understand that different pids running on the same host may have different listen IP addresses.

Please try to give me the most generic command / script which needs no or less modification running on different operating systems.

Last edited by mohtashims; 02-26-2013 at 08:05 AM..
# 7  
Old 02-26-2013
lsof is pretty system-independent once you have one for each system. If you have multiple IP server sockets can be listened on 0.0.0.0 (all), 127.0.0.1 (localhost only)or any of those addresses, which would have different host.domain names.

In practice, usually one server listening on 0.0.0.0 splits connections on multiple virtual server file trees based on the http header host.domain name. The host can have one IP with many DNS CNAME host.domain names that resolve to it. Browsers putting that IP in the URL or running on the server host using 127.0.0.1 will get the default virtual host.domain web service.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

PC RAM and process address space

Suppose I have 3 gb of ram and 250 gb hard disk in my pc. Now I wrote a simple C program having only one statement malloc() to allocate 4 gb of memory as 32 bit os can address 4gb address space then will the malloc succeed? If yes then how it will get extra 1 gb of memory? Does the process gets... (3 Replies)
Discussion started by: rupeshkp728
3 Replies

2. IP Networking

Configure squid to listen on any IP address with port 80

Hi, I am trying to configure a transparent squid cache. When I try to use the below option in squid.conf, squid listens on port 80 only for the IP address configured on the system's interface. http_port 80 transparent But I want squid to accept connections for any IP address on port 80.... (3 Replies)
Discussion started by: Learner32
3 Replies

3. Solaris

Process to make changed MAC address permanent

Hi If suppose there is a MAC address of NIC port. I have change the MAC address through following command # ifconfig hme0 ether a:0:30:f0.ad:51 The change MAC address will be there till reboot. Now I would like to know how to make the change MAC address permanent. I believe that... (1 Reply)
Discussion started by: amity
1 Replies

4. Programming

How to get address space size that a process is allowed to use

Hi All, From C++, I just want to find the address space size that a process is allowed to use. For ex, in 32 bit OS the allowed address space is 4GB and in 64 bit OS I guess this is 16GB or more. I jsut want to find it in my C++ project. Is there any API calls that gives me such information.... (2 Replies)
Discussion started by: Sendil Kumar
2 Replies

5. Linux

change the memory address of ld.linux-so in a dynamically linked process

hi, For some special reason , I'd like to control the memory address for the shared libraries in my dynamically linked process. And it is the "ld" which interpret the dynamically linked library, and in my system, the "ld-linux.so.2" is put at 0x00812000. Then I use "prelink -r" command to... (3 Replies)
Discussion started by: zerocool_08
3 Replies

6. UNIX for Dummies Questions & Answers

change the memory address of ld.linux-so in a dynamically linked process

hi, For some special reason , I'd like to control the memory address for the shared libraries in my dynamically linked process. And it is the "ld" which interpret the dynamically linked library, and in my system, the "ld-linux.so.2" is put at 0x00812000. Then I use "prelink -r" command to change... (0 Replies)
Discussion started by: zerocool_08
0 Replies

7. UNIX for Advanced & Expert Users

Can kernel process access user address space ?

Can kernel process access user address space ? (2 Replies)
Discussion started by: subhotech
2 Replies

8. Programming

Find Virtual address space size for process

Hi, I am looking to work on unix systems which include (hp-ux, ibm aix, solaris and linux). I want to get the total virtual address space of a process, the used virtual memory i am able to get without any problem. I have tried using getrlimit and getrlimit64, but that gives only ... (4 Replies)
Discussion started by: uiqbal
4 Replies

9. UNIX for Dummies Questions & Answers

listen to ports...

Hi all, How can I log all requests on ports for programs like ftp, telnet, rsh, xdmcp etc... I want to see if anyone uses these programs/protocols and how often. Is it difficult to setup a log for these ports and listen on all requests? /combat (4 Replies)
Discussion started by: tonlu
4 Replies

10. UNIX for Dummies Questions & Answers

How to find the size of Process Address space.

Hello, Please help me to know, How to find out the how much amount of process addres space is required/is used for/by a process. Tnx & Regards Vishwa. (1 Reply)
Discussion started by: S.Vishwanath
1 Replies
Login or Register to Ask a Question