Re: Proposal for Network::Monitor
| From: | Robert Peake | Date: | Fri, 05 Nov 2004 17:59:19 +0000 |
| Subject: | Re: Proposal for Network::Monitor | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34213@lists.php.net to get a copy of this message | ||
Olivier Guilyardi wrote:
Nice idea. In order to evaluate the quality of a hosting provider, it would be nice if it was also able to archive response timings. One could easily generate graphs with this data (with Image_Graph), to see if (and how many) times the server was down, and how fast it responds.Hi Oliver, While this seems like an obvious extension of the package, I have a couple of concerns with adding this functionality: 1) The package I currently use for network monitoring is cacti: http://www.cacti.net/ It is a front-end to rrdtool, a small database that handles historical data well. It works very well, however it only monitors network response times through ICMP (ping). I could roll network monitoring via ICMP into Net_Monitor, but it seems a bit like reinventing the wheel. 2) AFAIK, none of the network client packages (like Net_FTP, Net_DNS, HTTP_Client, or Net_SMTP) have any internal methods to monitor the response time of a connection. They just connect, or return a Pear_Error. So, Net_Monitor's only way of monitoring service connection times would be to call $benchmark->start(), run the connection from the client object, then call $benchmark->stop() and see how long it took. The problem with this approach is that you factor in all the overhead of each client package's connect routine into the benchmark result. Because overhead between packages will vary, as will overhead between systems (depending on how fast the hardware can execute PHP, if it is encoded, etc.) the benchmark would end up being only a *relative* measure at best -- not a real network response time for that service, not a measure you could compare between services, and not a measure you could compare between systems. Does anyone else have thoughts on this or see a way to return a more accurate network connection time benchmark? Thanks for the idea! Best, Robert