Monitor Server Performance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Denver Dave
    Member
    • Sep 2004
    • 49

    #1

    Monitor Server Performance

    With every host, but rarely with DH, the server performance seems to suffer. But does it really, is the situation unusual and how does this compare to reseller accounts at other hosting companies? I've seen nifty graphs of server load, which may explain why there is a problem at some other hosts, but not necessarily highlight when there is a problem that my clients may experience.

    ... So, I thought I'd create a standard dyanamic page on each of my servers and have a separate server (DH) request the page and measure the time - perhaps once per hour using a Cron job. Here is some initial code that I have experimented with using a Cron job with wgets http://DH_domain.com/aa_monitor/monitor.php:
    ========================
    <?php

    $time_start = microtime(true);

    $fcontents = join ('', file('http://domain_at_other_hoste.com/aa_monitor/'));

    $time_end = microtime(true);
    $time = $time_end - $time_start;

    $monitor_results = date("F j, Y, g:i a") . ", domain_at_other_host.com, $time seconds" . "\n";

    $myFile = fopen("monitor.txt","a");

    if (!($myFile))
    {
    print ("Error: ");
    print("monitor.txt could not be created\n");
    exit;
    }

    fputs($myFile, $monitor_results);

    fclose($myFile);

    ?>
    ==========================

    I think the above generates the dynamic page on the other server and measures the time to time to generate and pull the html to the DH server. Seems like I should also pull a small image, but not sure how to do that.

    So far both servers tested have always provided the html in less than a second in time periods when I am not aware of a problem. Interesting that sometimes the elapsed time is negative....

    Comments, Suggestions for best low impact server monitoring ??

    __________________
    Dave
    davebean@ecentral.com
  • sdjl
    Senior Member
    • Mar 2004
    • 502

    #2
    You've got to take into account the fact that you're pulling information across a network of computers.
    Anything could go wrong along those hops that are used to get the information.
    Whilst the cron uses one route to get to the script, your users (and yourself) will probably use a different route to get to the server.

    Although this may not initially be a problem, it could cause unnecessary panic or worry should the route that your script take come across some trouble.

    David
    -----
    Do you fear the obsolescence of the metanarrative apparatus of legitimation?

    Comment

    Working...