Todd Harris > Bio-GMOD > Bio::GMOD::Admin::Monitor::httpd

Download:
Bio-GMOD-0.028.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Bio::GMOD::Admin::Monitor::httpd - Monitor httpd

SYNOPSIS ^

Check that httpd is running at a specific site

  use Bio::GMOD::Admin::Monitor::httpd;
  my $gmod  = Bio::GMOD::Admin::Monitor::httpd->new(-mod=>'WormBase');
  my ($result,$status) $gmod->check_status(-site => 'http://www.flybase.org');
  print "Testing FlyBase status at " . $gmod->tested_at . ": $result";

DESCRIPTION ^

Bio::GMOD::Admin::Monitor::httpd provides methods for monitoring and restarting httpd as necessary at a MOD.

PUBLIC METHODS ^

$gmod->check_status(-site => SITE)

Check the status of httpd at a specified site. This is done by fetching the top level URL, assuming that if it can be retrieved that httpd is up.

This method returns a two element list comprised of ($string,$status). $string will contain a formatted string indicating the test, time, and result; $status will be boolean true or false indicating the success or failure of the test.

This method also populates the object with a variety of status strings. See the "ACCESSOR METHODS" section of Bio::GMOD::Admin::Monitor for additional details.

If SITE is not provided, the URL for the live site (fetched from the adaptor for the appropriate MOD) will be used:

  my $monitor = Bio::GMOD::Admin::Monitor::httpd->new(-mod=>'WormBase');
  $monitor->check_status();   # Checks the status of http://www.wormbase.org/

Note that you must specify the -mod option to new in order for this to work correctly.

$monitor->restart(-apachectl => APACHECTL);

Restart httpd using the apachectl script. If not provided as an option, assumes that apachectl resides at /usr/local/apache/bin/apachectl.

This method returns a two element list comprised of ($string,$status). $string will contain a formatted string indicating the test, time, and result; $status will be boolean true or false indicating the success or failure of the test.

Like check_status(), this method populates a number of status fields in the object. See the "ACCESSOR METHODS" section of Bio::GMOD::Admin::Monitor for additional details.

BUGS ^

None reported.

SEE ALSO ^

Bio::GMOD, Bio::GMOD::Admin::Monitor

AUTHOR ^

Todd W. Harris <harris@cshl.org>.

Copyright (c) 2003-2005 Cold Spring Harbor Laboratory.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: