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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identifying if a PORT is DOWN

Status
Not open for further replies.

dvknn

IS-IT--Management
Mar 11, 2003
94
US
Hi,

I have ServletExec port running on my Solaris box on one of the servers.

I would like to identify, if the ServletExec goes down.

Can I identify if the ServletExec goes down??

Thank You.
 
A very quick and dirty script could be as follows

STATUS = netstat -a | grep ftp | grep LISTEN | wc -l

This will return a 1 if the ftp port is listening. You will have to verify with the netstat -a to see if the name or just the port shows up.

!#/usr/bin/ksh


PORTUP=`netstat -a | grep ftp | grep LISTEN | wc -l`
echo "PORTUP = $PORTUP"
if [ PORTUP -eq 1 ];then
echo "UP"
else
echo "DOWN"
fi
 
Thank You..

OK.....So, when I have stopped my ServletExec, will the port be still listening? (I think the port would still be listening...but the ServletExec may not be UP)

Using a script, how can we monitor if the ServletExec is UP??
 
I am not familer with with ServletExec, but i would assume if it started the port listening when in quit or dies the process would no longer be listening to the port. If you have the opportunity, I would just test it. If you stop the httpd there will be nothing listening to port 80. Hope that helped. --Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top