Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-23-2012
posix's Avatar
Registered User
 
Join Date: Feb 2010
Location: grep "Bhubaneswar" "india"
Posts: 184
Thanks: 7
Thanked 13 Times in 13 Posts
Check the URL is alive or dead with port number

Hi,
I am running certain weblogic instance, in which it's hard to find which instance is stopped or running after stopping the weblogic , cause process status is for all the instance is same.
A URL which shows the instance is stopped or running.
But i have major challenge to check it through unix, cause it's having the port number and ping is not supporting it.
HTML Code:
ping -c4 my_url.com port_no
is not working for me.
Any other command does do the same job to check .

Thanks
Sponsored Links
    #2  
Old 03-23-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,374
Thanks: 491
Thanked 2,535 Times in 2,418 Posts
ping is ICMP, not related at all to ordinary TCP network connections.

Since it's a URL, try wget:


Code:
if wget -q http://server:port -O /dev/null
then
        echo "server:port is alive"
else
        echo "server:port is dead"
fi

Sponsored Links
    #3  
Old 03-28-2012
Registered User
 
Join Date: Sep 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Correct.
Or use --spider with wget:

Code:
       --spider
           When invoked with this option, Wget will behave as a Web spider, which means that it will not download the pages, just check that they are there.

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do you check whether a port currently being used? rajesh08 UNIX for Dummies Questions & Answers 6 05-13-2009 11:15 AM
How to check if a pid is alive? ScriptDummy Shell Programming and Scripting 6 06-29-2007 03:53 AM
Check whether a process is alive or not appleforme1415 UNIX for Dummies Questions & Answers 23 06-05-2007 12:47 AM
check if job still alive and killing it after a certain walltime ciwstevie Shell Programming and Scripting 3 07-27-2005 07:04 AM
FTP Port Number mbb UNIX for Advanced & Expert Users 2 04-22-2004 07:27 AM



All times are GMT -4. The time now is 06:00 PM.