Changeset 350
- Timestamp:
- 12/10/06 18:57:46 (6 years ago)
- Location:
- util
- Files:
-
- 3 modified
-
server_daily_maint (modified) (5 diffs)
-
server_daily_maint_component.tmpl (modified) (4 diffs)
-
server_daily_maint_main.tmpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
util/server_daily_maint
r341 r350 809 809 &graph_count_data($template, 'GRAPHS_OVERALL', 24,21,12,24, "c_".$c."_success_counter", "c_".$c."_fail_counter"); 810 810 811 my @sf; 812 foreach my $w ("success", "fail ")811 my @sf; 812 foreach my $w ("success", "failure") 813 813 { 814 814 my $h; 815 $h->{ 'NAME'} = $w;815 $h->{NAME} = $w; 816 816 817 817 my $g = "c_".$c."_".$w; 818 818 819 my (@timeslices, @versions);819 my @timeslices; 820 820 foreach my $timeslice ("day", "month") 821 821 { 822 my @versions; 822 823 foreach my $c 823 824 ( … … 825 826 keys %{($store->{"per_$timeslice"}->[0]->{$g."_version_list"})}) { 826 827 my $val = $store->{"per_$timeslice"}->[0]->{$g."_version_list"}->{$c}; 827 push @versions, { TIMES => sprintf("%d time%s", $val, ($val != 1 ? "s" : "")), 828 VERSION => $c }; 828 my $h2; 829 $h2->{'TIMES'} = sprintf("%d time%s", $val, ($val != 1 ? "s" : "")); 830 $h2->{'VERSION'} = $c; 831 push @versions, $h2; 829 832 } 830 833 push @timeslices, { TIMESLICE => $timeslice, VERSIONS => \@versions }; 831 834 } 832 push @sf, { SFV_TIMESLICES => \@timeslices };835 $h->{'SFV_TIMESLICES'} = \@timeslices; 833 836 834 837 my @durations = ( ); 835 838 foreach my $timeslice ("day", "month") 836 839 { 837 if ((defined $store->{ per_month}->[0]->{$g."_duration_count"}) && ($store->{per_month}->[0]->{$g."_duration_count"} > 0))840 if ((defined $store->{"per_$timeslice"}->[0]->{$g."_duration_count"}) && ($store->{"per_$timeslice"}->[0]->{$g."_duration_count"} > 0)) 838 841 { 839 842 push @durations, { AVG => sec2hms(numvar($store->{"per_$timeslice"}->[0]->{$g."_duration"},"",0) / $store->{"per_$timeslice"}->[0]->{$g."_duration_count"}), … … 842 845 } 843 846 } 844 push @sf, { DURATIONS => \@durations }; 845 846 push @sf, { GRAPHS_DURATIONS => &graph_count_data(undef, undef, 24,21,12,24,$g."_duration", $g."_duration_min", $g."_duration_max") }; 847 $h->{'DURATIONS'} = \@durations; 848 849 $h->{'GRAPHS_DURATIONS'} = &graph_count_data(undef, undef, 24,21,12,24,$g."_duration", $g."_duration_min", $g."_duration_max"); 850 push @sf, $h; 847 851 } 848 852 $template->param(SUCCESS_FAILURE => \@sf); … … 861 865 if ((defined $store->{"per_$timeslice"}->[0]->{$svar."_duration_count"}) && ($store->{"per_$timeslice"}->[0]->{$svar."_duration_count"} > 0)) 862 866 { 863 push @timeslices, { 'TIMESLICE' => $timeslice, 864 'AVG' => numvar($store->{"per_$timeslice"}->[0]->{$svar."_duration"},"",0) / $store->{"per_$timeslice"}->[0]->{$svar."_duration_count"}, 865 'MIN' => numvar($store->{"per_$timeslice"}->[0]->{$svar."_duration_min"},"",0), 866 'MAX' => numvar($store->{"per_$timeslice"}->[0]->{$svar."_duration_max"},"",0) }; 867 my $h; 868 $h->{TIMESLICE} = $timeslice; 869 $h->{AVG} = nformat(numvar($store->{"per_$timeslice"}->[0]->{$svar."_duration"},"",0) / $store->{"per_$timeslice"}->[0]->{$svar."_duration_count"}); 870 $h->{MIN} = nformat(numvar($store->{"per_$timeslice"}->[0]->{$svar."_duration_min"},"",0)); 871 $h->{MAX} = nformat(numvar($store->{"per_$timeslice"}->[0]->{$svar."_duration_max"},"",0)); 872 push @timeslices, $h; 867 873 } 868 874 } 869 push @statistics, { STATNAME => $sname, TIMESLICES => \@timeslices }; 870 871 push @statistics, { GRAPHS_STATISTICS => &graph_count_data(undef, undef, 72,0,12,0,$svar."_duration", $svar."_duration_min", $svar."_duration_max")}; 872 } 875 push @statistics, { STATNAME => $sname, TIMESLICES => [ @timeslices ], GRAPHS_STATISTICS => &graph_count_data(undef, undef, 72,0,12,0,$svar."_duration", $svar."_duration_min", $svar."_duration_max")}; 876 } 877 # print Dumper(\@statistics); 873 878 $template->param(STATISTICS => \@statistics); 874 879 … … 879 884 } 880 885 881 ############################################################################### 882 883 886 sub nformat 887 { 888 my $n = shift; 889 return sprintf("%0.2f", $n); 890 } 891 892 ############################################################################### 893 894 -
util/server_daily_maint_component.tmpl
r341 r350 28 28 </TMPL_LOOP> 29 29 <li><b>TOTAL SEEN: <u><TMPL_VAR NAME=COMPONENT_SUCCESS_RUNS_TOTAL></u></b></li> 30 <b >Failed runs:</b><br>30 <br><b>Failed runs:</b> <font color=lightblue><i>(blue)</i></font><br> 31 31 <TMPL_LOOP NAME=COMPONENT_FAIL_RUNS> 32 32 <li>in last <TMPL_VAR NAME=TIMESLICE>: <b><TMPL_VAR NAME=SEEN></b> (previous <TMPL_VAR NAME=PREVIOUS>)</li> … … 54 54 <h2>Duration (<TMPL_VAR NAME=NAME>)</h2> 55 55 <b>How long <TMPL_VAR NAME=NAME> took to run (<TMPL_VAR NAME=NAME>):</b><br> 56 <TMPL_LOOP NAME=DURATION >56 <TMPL_LOOP NAME=DURATIONS> 57 57 <li><b>in last <TMPL_VAR NAME=TIMESLICE>:</b><br> 58 58 Avg: <TMPL_VAR NAME=AVG> <i><font color=lightgreen>(green)</font></i><br> … … 69 69 </TMPL_LOOP> 70 70 71 </table><br><br> 72 <h2>Grabber-specific statistics</h2> 73 <table align=left> 74 71 75 <TMPL_LOOP NAME=STATISTICS> 72 76 <tr><td align=left valign=top nowrap> 73 <h2 <TMPL_VAR NAME=NAME><TMPL_VAR NAME=STATNAME></h2>77 <h2><TMPL_VAR NAME=STATNAME></h2> 74 78 <TMPL_LOOP NAME=TIMESLICES> 75 79 <li><b>in last <TMPL_VAR NAME=TIMESLICE>:</b><br> … … 87 91 </TMPL_LOOP> 88 92 89 90 91 92 93 ---94 95 <tr><td align=left valign=top nowrap>96 <h2>Unique Users</h2>97 <b>Number of unique systems seen:</b> <font color=lightgreen><i>(green)</i></font><br>98 <TMPL_LOOP NAME=USERS>99 <li>in last <TMPL_VAR NAME=TIMESLICE>:<b><TMPL_VAR NAME=SEEN></b> (previous <TMPL_VAR NAME=PREVIOUS>)</li>100 </TMPL_LOOP>101 </ul>102 <b>TOTAL SEEN: <u><TMPL_VAR NAME=USERS_TOTAL></u></b>103 </td><td nowrap><br>104 <TMPL_LOOP NAME=GRAPHS_USERS>105 <TMPL_VAR NAME=GRAPH>106 </TMPL_LOOP>107 </td></tr>108 109 <tr><td align=left valign=top nowrap>110 <h2>Start Time</h2>111 <b>When shepherd checked in:</b> <font color=lightgreen><i>(green)</i></font><br>112 (when shepherd is being run)</i><p>113 (in 15 minute groups, time in GMT+10)114 </td><td nowrap><br>115 <TMPL_LOOP NAME=GRAPHS_RUNTIME>116 <TMPL_VAR NAME=GRAPH>117 </TMPL_LOOP>118 </td></tr>119 120 <tr><td align=left valign=top nowrap>121 <h2>Duration</h2>122 <b>How long shepherd took to run:</b><br>123 <TMPL_LOOP NAME=DURATION>124 <li><b>in last <TMPL_VAR NAME=TIMESLICE>:</b><br>125 Avg: <TMPL_VAR NAME=AVG> <i><font color=lightgreen>(green)</font></i><br>126 Min: <TMPL_VAR NAME=MIN> <i><font color=lightblue>(blue)</font></i><br>127 Max: <TMPL_VAR NAME=MAX> <i><font color=pink>(red)</font></i><br>128 </li>129 </TMPL_LOOP>130 </td><td nowrap align=left>131 <TMPL_LOOP NAME=GRAPHS_DURATION>132 <TMPL_VAR NAME=GRAPH>133 </TMPL_LOOP>134 </td></tr>135 136 <tr><td align=left valign=top nowrap>137 <h2>Timezones</h2>138 <b>Where shepherd is being run:</b> <font color=lightgreen><i>(green)</i></font><br>139 <i>(timezone setting of hosts)</i><p>140 </td><td nowrap><br>141 <TMPL_LOOP NAME=GRAPHS_TIMEZONE>142 <TMPL_VAR NAME=GRAPH>143 </TMPL_LOOP>144 </td></tr>145 146 <tr><td align=left valign=top nowrap colspan=2>147 <h2>Components Used</h2>148 <TMPL_LOOP NAME=COMPONENTS_USED>149 <li><b>in last <TMPL_VAR NAME=TIMESLICE>:</b><br>150 <TMPL_LOOP NAME=COMPONENTS_USED_TIMESLICES>151 <b><TMPL_VAR NAME=TIMES></b>: <TMPL_VAR NAME=DETAIL><br>152 </TMPL_LOOP>153 </li>154 </TMPL_LOOP>155 156 <tr><td align=left valign=top nowrap colspan=2>157 <h2>Detailed Component Statistics</h2>158 <p><table align=center>159 <TMPL_LOOP NAME=COMPONENTS>160 <TMPL_IF NAME=FOURTH></tr><tr></TMPL_IF>161 <td>162 <b><a href="<TMPL_VAR NAME=NAME>.html"><TMPL_VAR NAME=NAME></a></b><br>163 <b>Successful runs:</b><br>164 <TMPL_LOOP NAME=COMPONENT_SUCCESS_RUNS>165 <li>in last <TMPL_VAR NAME=TIMESLICE>: <b><TMPL_VAR NAME=SEEN></b> (previous <TMPL_VAR NAME=PREVIOUS>)</li>166 </TMPL_LOOP>167 <li><b>TOTAL SEEN: <u><TMPL_VAR NAME=COMPONENT_SUCCESS_RUNS_TOTAL></u></b></li>168 <b>Failed runs:</b><br>169 <TMPL_LOOP NAME=COMPONENT_FAIL_RUNS>170 <li>in last <TMPL_VAR NAME=TIMESLICE>: <b><TMPL_VAR NAME=SEEN></b> (previous <TMPL_VAR NAME=PREVIOUS>)</li>171 </TMPL_LOOP>172 <li><b>TOTAL SEEN: <u><TMPL_VAR NAME=COMPONENT_FAIL_RUNS_TOTAL></u></b></li></td>173 </TMPL_LOOP>174 175 </tr></table>176 177 93 </td></tr></table> 178 94 <br clear=all> -
util/server_daily_maint_main.tmpl
r341 r350 1 1 <html> 2 2 <head> 3 <title>Shepherd </title>3 <title>Shepherd Statistics: Overall</title> 4 4 <style> 5 5 a { color: #F6B620; text-decoration: none; border-bottom: 1px dotted #F6B620; }
