[H-GEN] testing network connectivity with perl
Michael Anthon
michael at anthon.net
Sun Aug 24 07:08:12 EDT 2003
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Conor Cunningham wrote:
> I'm currently writing a script that simply pings a UNIX box every sixty
> seconds
> and logs any failed pings. However, I have been asked to connect to an
> ORACLE port on the same UNIX box and log if the connection ever drops out.
>
> The connection sometimes drops out, but only for a split second, and we
> need to prove this fact with logs files.
As others have said, your current approach probably won't work terribly
well and it depends on exactly what sort of error you are checking for.
If it is a simple socket disconnection for unknown reasons then you
could probably modify your script a bit just to connect to the server
and then sit there waiting for the connection to close. If the problem
is caused by the server closing the connection then you should be
getting some sort of result by doing this.
Have you checked to see if what you are getting is not being caused by
an oracle thread being killed for some reason? There are quite a few
instances where an oracle thread will die and disconnect the client.
Oracle does generally keep some pretty reasonable logs when this happens
so if that is the case you should be able to track those down. Check in
$ORACLE_HOME/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log and the
directories $ORACLE_HOME/admin/$ORACLE_SID/bdump and
$ORACLE_HOME/admin/$ORACLE_SID/cdump for *.trc files. These can be
quite illuminating.
Cheers
Michael
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list