Subversion Repositories DevTools

Rev

Rev 7423 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7423 Rev 7460
Line 61... Line 61...
61
my $conf;
61
my $conf;
62
my $yday = -1;
62
my $yday = -1;
63
my $linkUp = 1;
63
my $linkUp = 1;
64
my $RM_DB;
64
my $RM_DB;
65
my $activeReleases;
65
my $activeReleases;
66
my $wedgedCount = 0;
-
 
67
 
66
 
68
#
67
#
69
#   Contain statisics maintained while operating
68
#   Contain statisics maintained while operating
70
#       Can be dumped with a kill -USR2
69
#       Can be dumped with a kill -USR2
71
#       List here for documentation
70
#       List here for documentation
Line 100... Line 99...
100
    'sleepLinkDown'   => {'default'   => '1m'   , 'fmt' => 'period'},
99
    'sleepLinkDown'   => {'default'   => '1m'   , 'fmt' => 'period'},
101
    'dpkg_archive'    => {'mandatory' => 1      , 'fmt' => 'dir'},
100
    'dpkg_archive'    => {'mandatory' => 1      , 'fmt' => 'dir'},
102
    'logfile'         => {'mandatory' => 1      , 'fmt' => 'vfile'},
101
    'logfile'         => {'mandatory' => 1      , 'fmt' => 'vfile'},
103
    'logfile.size'    => {'default'   => '1M'   , 'fmt' => 'size'},
102
    'logfile.size'    => {'default'   => '1M'   , 'fmt' => 'size'},
104
    'logfile.count'   => {'default'   => 9      , 'fmt' => 'int'},
103
    'logfile.count'   => {'default'   => 9      , 'fmt' => 'int'},
-
 
104
    'wedgeTime'       => {'default'   => '30m'  , 'fmt' => 'period'},
105
 
105
 
106
    'verbose'         => {'default'   => 0      , 'fmt' => 'int'},                  # Debug ...
106
    'verbose'         => {'default'   => 0      , 'fmt' => 'int'},                  # Debug ...
107
    'active'          => {'default'   => 1      , 'fmt' => 'bool'},                 # Disable alltogether
107
    'active'          => {'default'   => 1      , 'fmt' => 'bool'},                 # Disable alltogether
108
    'debug'           => {'default'   => 0      , 'fmt' => 'bool'},                 # Log to screen
108
    'debug'           => {'default'   => 0      , 'fmt' => 'bool'},                 # Log to screen
109
    'txdetail'        => {'default'   => 0      , 'fmt' => 'bool'},                 # Show transfer times
109
    'txdetail'        => {'default'   => 0      , 'fmt' => 'bool'},                 # Show transfer times
Line 139... Line 139...
139
#
139
#
140
while (1)
140
while (1)
141
{
141
{
142
    $logger->verbose3("Processing");
142
    $logger->verbose3("Processing");
143
    $statistics{Cycle}++;
143
    $statistics{Cycle}++;
144
    $wedgedCount = 0;
-
 
145
    $now = time();
144
    $now = time();
-
 
145
    Utils::resetWedge();
146
 
146
 
147
    $statistics{phase} = 'ReadConfig';
147
    $statistics{phase} = 'ReadConfig';
148
    readConfig();
148
    readConfig();
149
    if ( $conf->{'active'} )
149
    if ( $conf->{'active'} )
150
    {
150
    {
Line 1161... Line 1161...
1161
    #   A few local stats
1161
    #   A few local stats
1162
    #
1162
    #
1163
    $statistics{SeqNum}++;
1163
    $statistics{SeqNum}++;
1164
    $statistics{timeStamp} = time();
1164
    $statistics{timeStamp} = time();
1165
    $statistics{upTime} = $statistics{timeStamp} - $startTime;
1165
    $statistics{upTime} = $statistics{timeStamp} - $startTime;
1166
    $statistics{wedged} = $wedgedCount++ > 30  ? 1 : 0;
1166
    $statistics{wedged} = Utils::isWedged($conf);
1167
 
1167
 
1168
    if ( $statistics{wedged}) {
1168
    if ( $statistics{wedged}) {
1169
         $statistics{state} = 'Wedged';
1169
         $statistics{state} = 'Wedged';
1170
    } elsif(!$linkUp){
1170
    } elsif(!$linkUp){
1171
        $statistics{state} = 'S3 Bucket Read Error';
1171
        $statistics{state} = 'S3 Bucket Read Error';