cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL behaving incorrectly when doing simultaneus checks? ? ? Second try

From: <secman_at_freedom.net>
Date: Fri, 12 Oct 2001 14:02:18 +0300

Zero-Knowledge MIME Encapsulated Message

------=_NextPart_000_001C_01C15326.81633630
Content-Type: text/plain;
     charset = "iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there

Let's try again...

I have written a bash script checking web servers

...
https://${IP}/check.html | grep ${STRINGTOCHECK})
CUR=3D$(curl --connect-timeout ${TIMEOUT} --max-time ${TIMEOUT} -3 =
https://${IP}${PATH})
TEST=3D$(echo $CUR | grep ${TEXTTOSEARCH})
# If not zero, server is OK
if [[ ! $TEST =3D=3D "" ]]; then
...

The abovementioned script is used to check multiple servers each minutes =
using cron:
* * * * * root /root/scripts/check Aldebaran localhost localhost 30 5
* * * * * root /root/scripts/check Apollo Net1 yy.yy.yy.yy 30 5
* * * * * root /root/scripts/check Iceberg Net2 xx.xx.xx.xx 30 5

Now it seems that if curl (latest RH 7.1 version) can't access Apollo =
vie Net1 (externat check) quite often but not always the curl process =
that checks Aldebaran (which is checked locally) returns the same output =
as the curl process checking Apollo -> I get faulty messages about =
Aldebaran being down
=20
I.e. : should cURL be able to independently do simultaneous checks? ? ? =
?

J

------=_NextPart_000_001C_01C15326.81633630
Content-Type: text/html;
     charset = "iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hi there</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Let's try again...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have written a bash script checking =
web=20
servers</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
style=3D"mso-fareast-font-family: 'MS Mincho'"><A=20
href=3D"https://${">https://${</A>IP}/check.html | grep=20
${STRINGTOCHECK})<BR>CUR=3D$(curl --connect-timeout ${TIMEOUT} =
--max-time=20
${TIMEOUT} -3 <A =
href=3D"https://${">https://${</A>IP}${PATH})<BR>TEST=3D$(echo $CUR=20
| grep ${TEXTTOSEARCH})<BR># If not zero, server is OK<BR>if [[ ! $TEST =
=3D=3D ""=20
]]; then<BR></SPAN></FONT><FONT face=3DArial size=3D2><SPAN=20
style=3D"mso-fareast-font-family: 'MS Mincho'">...</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The abovementioned script is used to =
check multiple=20
servers each minutes using cron:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
style=3D"mso-fareast-font-family: 'MS Mincho'">* * * * * root=20
/root/scripts/check&nbsp;Aldebaran localhost localhost<SPAN=20
style=3D"mso-spacerun: yes"> </SPAN>30 5<BR>* * * * * root=20
/root/scripts/check&nbsp;<SPAN style=3D"mso-spacerun: yes">Apollo =
</SPAN><SPAN=20
style=3D"mso-spacerun: yes">Net1 </SPAN>yy.yy.yy.yy 30 5<BR>* * * * * =
root=20
/root/scripts/check&nbsp;Iceberg<SPAN style=3D"mso-spacerun: yes"> =
</SPAN><SPAN=20
style=3D"mso-spacerun: yes">Net2 </SPAN>xx.xx.xx.xx 30 =
5<BR></SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
style=3D"mso-fareast-font-family: 'MS Mincho'">Now it seems that if curl =
(latest=20
RH 7.1 version) can't access Apollo vie Net1 (externat check) quite =
often but=20
not always the curl process that checks Aldebaran (which is checked =
locally)=20
returns the same output as the curl process checking Apollo -&gt; I get =
faulty=20
messages about Aldebaran being down</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
style=3D"mso-fareast-font-family: 'MS =
Mincho'"></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
style=3D"mso-fareast-font-family: 'MS Mincho'">I.e. : should cURL be =
able to=20
independently do simultaneous checks? ? ? ?</DIV></SPAN></FONT>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>J</FONT></DIV></BODY></HTML>

------=_NextPart_000_001C_01C15326.81633630--
Received on 2001-10-12