Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for scripts/perl/syswatcher/syswatcher.pl between version 1.7 and 1.8

version 1.7, 2004/01/05 11:34:21 version 1.8, 2005/02/07 22:07:59
Line 13 
Line 13 
 # 16/10/2003 - added automatic database reconnecting (nepto)  # 16/10/2003 - added automatic database reconnecting (nepto)
 #  #
   
 # $Platon: scripts/syswatcher/syswatcher.pl,v 1.6 2003/12/11 13:04:56 rajo Exp $  # $Platon: scripts/perl/syswatcher/syswatcher.pl,v 1.7 2004/01/05 11:34:21 nepto Exp $
   
 use strict;  use strict;
   
Line 82  while (1) {
Line 82  while (1) {
   
         Time::HiRes::sleep ($update_interval - (Time::HiRes::gettimeofday % $update_interval));          Time::HiRes::sleep ($update_interval - (Time::HiRes::gettimeofday % $update_interval));
         while ($dbh) {          while ($dbh) {
   
                   my $sleep = 1;
                   while (!defined($dbh) or ref($dbh) ne 'DBI::db' or !($dbh->ping())) {
                           print STDERR "CheckDB - db ping error\n";
                           sleep $sleep;
                           $sleep += 10 if ($sleep < 120);
                   }
   
                   $dbh->{mysql_auto_reconnect} = 1;
   
                   #
                   # DB ping must be done twice (bug in DBI??), otherwise warning "DBD::mysql::st execute warning:" [rajo]
                   #
                   my $rv = $dbh->ping();
                   $dbh->{mysql_auto_reconnect} = 1;
   
                 last if (! loadavg());                  last if (! loadavg());
                 last if (! meminfo());                  last if (! meminfo());
   

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top