Monitor Service through Port Response

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
trent2800
Forum Commoner
Posts: 48
Joined: Mon Oct 02, 2006 7:02 am

Monitor Service through Port Response

Post by trent2800 »

The place that I work has a number of Lotus Notes servers that go down all the time. Unfortunatly, they do not go hard down, they just stop responding to requests. So, a simple ping for monitoring does not seem to suffice. What would be the simplest way to code something like this. I believe that they stop responding on port 1352 so, is there a way to "ping" that port with a script? I would be open to anything, not just PHP.

Thanks, Tyler
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You could try to open a tcp connection to that port.

Code: Select all

$fp = fsockopen("tcp://10.0.1.15", 1352, $errno, $errstr, 4);
if (!$fp) {
   echo "ERROR: $errno - $errstr<br />\n";
} else {
   echo "Ok<br />\n";
}
But it doesn't help much to cure only the symptoms. Take a look at http://www-128.ibm.com/developerworks/l ... r-crashes/
trent2800
Forum Commoner
Posts: 48
Joined: Mon Oct 02, 2006 7:02 am

Post by trent2800 »

Thanks

And, I know that there is a better way to deal, but my group is monitoring. We get shot if we try something like that. :)
Post Reply