mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=9368
This commit is contained in:
parent
08fea1634c
commit
f6f1835534
|
@ -1222,3 +1222,13 @@ David 31 Jan 2006
|
|||
client/
|
||||
client_types.C,h
|
||||
cs_apps.C
|
||||
|
||||
David 31 Jan 2006
|
||||
- add "table stats" web page
|
||||
(from Carl Christensen)
|
||||
|
||||
html/
|
||||
inc/
|
||||
util.inc
|
||||
ops/
|
||||
sample_table_stats.php
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
require_once("docutil.php");
|
||||
require_once("download_network.inc");
|
||||
|
||||
page_head("Download BOINC add-on software");
|
||||
page_head("BOINC add-on software");
|
||||
echo "
|
||||
<p>
|
||||
You can download applications in several categories.
|
||||
A number of programs that complement or enhance BOINC are available.
|
||||
Note that:
|
||||
<ul>
|
||||
<li>
|
||||
These applications are not endorsed by BOINC and
|
||||
|
|
|
@ -76,6 +76,7 @@ resources.
|
|||
</ul>
|
||||
<a href=participate.php>More info</a>
|
||||
| <a href=links.php>Web sites </a>
|
||||
| <a href=download_network.php>Add-ons</a>
|
||||
| <a href=dev/>Message boards</a>
|
||||
|
||||
<br><br>
|
||||
|
|
|
@ -238,7 +238,8 @@ function rowify($string) {
|
|||
function row_array($x) {
|
||||
echo "<tr>";
|
||||
foreach ($x as $h) {
|
||||
echo "<td>$h</th>";
|
||||
if (!$h) $h = '<br>';
|
||||
echo "<td>$h</td>";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
function showTableStatus($db) {
|
||||
$size = 0;
|
||||
$out = "";
|
||||
start_table();
|
||||
row1($db, 15);
|
||||
row_array(array("Name", "Engine", "Version", "Row Format", "Rows", "Avg Row Length (KB)", "Data Length (MB)", "Max Data Length (MB)", "Index Length (MB)", "Data free (MB)", "Create Time", "Update Time", "Check Time", "Create Options", "Comment"));
|
||||
mysql_select_db($db);
|
||||
$result = mysql_query("show table status");
|
||||
while($row = mysql_fetch_array($result)) {
|
||||
$size += ($row["Data_length"] + $row["Index_length"]);
|
||||
$engine = $row["Engine"];
|
||||
if (!$engine) $engine = $row["Type"];
|
||||
row_array(array(
|
||||
$row["Name"],
|
||||
$engine,
|
||||
$row["Version"] ,
|
||||
$row["Row_format"] ,
|
||||
$row["Rows"] ,
|
||||
round($row["Avg_row_length"]/1024,2) ,
|
||||
round($row["Data_length"]/(1024*1024),2) ,
|
||||
round($row["Max_data_length"]/(1024*1024),2) ,
|
||||
round($row["Index_length"]/(1024*1024),2) ,
|
||||
round($row["Data_free"]/(1024*1024),2) ,
|
||||
$row["Create_time"] ,
|
||||
$row["Update_time"] ,
|
||||
$row["Check_time"] ,
|
||||
$row["Create_options"] ,
|
||||
$row["Comment"]
|
||||
));
|
||||
}
|
||||
$size = round(($size/1024)/1024, 1);
|
||||
row2("Total Table Sizes (MB)", $size);
|
||||
end_table();
|
||||
echo "<BR><BR>";
|
||||
}
|
||||
|
||||
require_once("../inc/db.inc");
|
||||
db_init();
|
||||
page_head("MySQL Table Stats");
|
||||
|
||||
// add the databases you want to keep track of here
|
||||
//
|
||||
showTableStatus("boinc_alpha");
|
||||
showTableStatus("cplan");
|
||||
?>
|
||||
|
Loading…
Reference in New Issue