Page 1 of 1

Monitor Service through Port Response

Posted: Thu Feb 15, 2007 8:17 pm
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

Posted: Fri Feb 16, 2007 6:06 am
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/

Posted: Fri Feb 16, 2007 12:15 pm
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. :)