line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MMM::Report::Console; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
4002
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
102
|
|
4
|
2
|
|
|
2
|
|
13
|
use base qw(MMM::Report); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
941
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
MMM::Report::Console |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 SYNOPSIS |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
use MMM::Report::Console; |
13
|
|
|
|
|
|
|
my $mmm = MMM::Report::Console->new( configfile => $file ); |
14
|
|
|
|
|
|
|
$mmm->run(); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Produce textual report of MMM work done. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SEE ALSO |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
L |
23
|
|
|
|
|
|
|
L |
24
|
|
|
|
|
|
|
L |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub body_queue { |
29
|
0
|
|
|
0
|
1
|
|
my ($self, $queue, %info) = @_; |
30
|
0
|
|
|
|
|
|
printf("%s (%s)\n", $queue->name, $queue->dest); |
31
|
0
|
0
|
|
|
|
|
printf(" last %s end %s\n", |
|
|
0
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$info{job}{success} ? 'mirror' : 'try', |
33
|
|
|
|
|
|
|
$info{job}{end} ? scalar (gmtime($info{job}{end})) : '(N/A)', |
34
|
|
|
|
|
|
|
); |
35
|
0
|
0
|
0
|
|
|
|
if (!$info{job}{success} && $info{success}{end}) { |
36
|
0
|
|
|
|
|
|
printf(" last mirror succefully done %s\n", scalar (gmtime($info{success}{end}))); |
37
|
|
|
|
|
|
|
} |
38
|
0
|
|
|
|
|
|
print "\n"; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Olivier Thauvin |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Copyright (C) 2006 Olivier Thauvin |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
52
|
|
|
|
|
|
|
modify it under the terms of the GNU General Public License |
53
|
|
|
|
|
|
|
as published by the Free Software Foundation; either version 2 |
54
|
|
|
|
|
|
|
of the License, or (at your option) any later version. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
57
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
58
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
59
|
|
|
|
|
|
|
GNU General Public License for more details. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
62
|
|
|
|
|
|
|
along with this program; if not, write to the Free Software |
63
|
|
|
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|