Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application status 1

Status
Not open for further replies.

inunix

Technical User
Jul 30, 2002
53
US
One of my application running as a service(say port: 1404) in unix.

How do I check the availability of my application.?
 
You could run a script that periodically uses nmap to test whether the port is open. (nmap -p 1404).

This will tell you whether the application (or any application) has opened the port for receive.It will not tell you that the "upper" layers of the logic of your code are working though.

You say "your" code - if you mean by this that you wrote the cod and therefore have access to the source code then assuming that the application accepts messages from clients, processes them and then returns a response it should be possible to write a "loopback" transaction where a client sends a known message to the application and gets a known response back.

Once you've done this you could write a script that uses the Expect product in conjunction with Telnet (to port 1404) to periodically send the "loopback" message and test for a valid response.

Let me know if you want to explore this line of thinking more fully and I'll post more detailed information.

Cheers - Gavin
 
List all the ports which are listening with the
Code:
netstat -l
command.
 
Thanks Salem.

Hi Gavin,

Your assumptions are right. It is not my code. It is a third party tool. It is register for the port# 1404.

I just wanted to find out, whether the port is active and my application is listening to that port.

I'm not that good at networking, so I'm not able to explain it it more technical terms.

Hope your understood my requirement.

Thanks.
SSK
 
You can download lsof at ftp://vic.cc.purdue.edu and then trying something like this:
Code:
lsof -i :1404
to see all the process concerned by this port#

Hope This Help
PH.
 
My unix box is Sun solaris.

I tried
netstat -l
and
nmap -p 1404

Both did not work.

Also PHV, I'm not able to get into the site you have given.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top