CMD to check status of the server using Wget

Hi All,

Using Wget I'm able to get the status of the server.....only when the server is completely down or up....
but problem here in script is Suppose if the server got hang I mean to say that if the server is taking long time to login, for example normally the server takes 3 seconds to login ...but if the server takes more than 10 seconds or 1min to login...in this case the wget cmd is not providing expected results

then how Do I know that server is taking more time to respond/login
in this case how can I get a resolution..

URL1="dellsys01.sys.com:8080"
RESULT=$((time wget  --user=samuel --password=12345 -O log.err -q $URL1 ;) 2>&1 || echo "Not Running")
echo "$RESULT" >> output.rslt
wget_status=`awk 'NR==5' output.rslt`
echo "$wget_status"
if [ "$wget_status" == "Not Running" ]
        then
echo `date` "dellsys01 console is not responding"
if
rm output.rslt

Please use code tags as required by forum rules!

You may want to consider the

option to wget and check the exit status code.

I didnt get you.....You mean to say that is there any solution for this problem..

how can I use the parameter connect-timeout=seconds in my code...can you please help me out

Right after the wget command.