|
15 | 15 | #
|
16 | 16 | # This program is distributed in the hope that it will be useful,
|
17 | 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
| -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 | 19 | # GNU General Public License for more details.
|
20 | 20 | #
|
21 | 21 | # You should have received a copy of the GNU General Public License
|
22 |
| -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
23 | 23 | #
|
24 | 24 |
|
25 | 25 | use strict;
|
@@ -370,14 +370,14 @@ sub fetch_mysql_data {
|
370 | 370 | $status{'relay_log_space'} = $row->{'relay_log_space'};
|
371 | 371 | $status{'slave_lag'} = $row->{'seconds_behind_master'};
|
372 | 372 |
|
373 |
| - # Check replication heartbeat, if present. |
374 |
| - # if ( $hb_table ) { |
375 |
| - # $result = run_query( |
376 |
| - # "SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1)" |
377 |
| - # . "FROM $hb_table WHERE id = 1", $conn); |
378 |
| - # $row2 = @mysql_fetch_row($result); |
379 |
| - # $status{'slave_lag'} = $row2[0]; |
380 |
| - # } |
| 373 | + # Check replication heartbeat, if present. |
| 374 | + # if ( $hb_table ) { |
| 375 | + # $result = run_query( |
| 376 | + # "SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1)" |
| 377 | + # . "FROM $hb_table WHERE id = 1", $conn); |
| 378 | + # $row2 = @mysql_fetch_row($result); |
| 379 | + # $status{'slave_lag'} = $row2[0]; |
| 380 | + # } |
381 | 381 |
|
382 | 382 | # Scale slave_running and slave_stopped relative to the slave lag.
|
383 | 383 | $status{'slave_running'}
|
@@ -511,7 +511,7 @@ sub fetch_mysql_data {
|
511 | 511 | elsif ( $line =~ m/Log flushed up to/ ) {
|
512 | 512 |
|
513 | 513 | # Since PHP can't handle 64-bit numbers, we'll ask MySQL to do it for
|
514 |
| - # us instead. And we get it to cast them to strings, too. |
| 514 | + # us instead. And we get it to cast them to strings, too. |
515 | 515 | @flushed_to = ( $row[4], $row[5] );
|
516 | 516 | }
|
517 | 517 |
|
@@ -714,8 +714,8 @@ ($$$$)
|
714 | 714 | my ( $handler, $registration_info, $request_info, $requests ) = @_;
|
715 | 715 | my ($request);
|
716 | 716 |
|
717 |
| - # print STDERR "refs: ",join(", ", ref($handler), ref($registration_info), |
718 |
| - # ref($request_info), ref($requests)),"\n" if ($debugging); |
| 717 | +# print STDERR "refs: ",join(", ", ref($handler), ref($registration_info), |
| 718 | +# ref($request_info), ref($requests)),"\n" if ($debugging); |
719 | 719 |
|
720 | 720 | for ( $request = $requests; $request; $request = $request->next() ) {
|
721 | 721 |
|
@@ -754,7 +754,7 @@ ($$$$)
|
754 | 754 | $i++;
|
755 | 755 |
|
756 | 756 | #print STDERR "Comparing $oid to $oidToUse ".ref($oid)." ".ref($oidToUse).
|
757 |
| -# " cmp=".NetSNMP::OID::compare($oid, $oidToUse)." cmp2=".($oid <= $oidToUse)."\n"; |
| 757 | +# " cmp=".NetSNMP::OID::compare($oid, $oidToUse)." cmp2=".($oid <= $oidToUse)."\n"; |
758 | 758 | } while ( NetSNMP::OID::compare( $oid, $oidToUse ) > -1
|
759 | 759 | and $i <= scalar @ks );
|
760 | 760 |
|
|
776 | 776 | print STDERR $msg . "\n" if ($debugging);
|
777 | 777 | }
|
778 | 778 |
|
779 |
| -# We need to perform a loop here waiting for snmp requests. We |
| 779 | +# We need to perform a loop here waiting for snmp requests. We |
780 | 780 | # also check for new STATUS data.
|
781 | 781 | $SIG{'INT'} = \&shut_it_down;
|
782 | 782 | $SIG{'QUIT'} = \&shut_it_down;
|
|
0 commit comments