Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
ae61367f
Commit
ae61367f
authored
Nov 22, 2002
by
Robert Ricci
Browse files
Added some simple experiment statistics for Jay.
parent
cbb4d2c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/index.php3
View file @
ae61367f
...
...
@@ -11,8 +11,50 @@ require("defs.php3");
#
PAGEHEADER
(
"Home"
);
# Get some stats about current experiments
$query_result
=
DBQueryFatal
(
"select count(*) from experiments where "
.
"state='active'"
);
if
(
mysql_num_rows
(
$query_result
)
!=
1
)
{
$active_expts
=
"ERR"
;
}
else
{
$row
=
mysql_fetch_array
(
$query_result
);
$active_expts
=
$row
[
0
];
}
$query_result
=
DBQueryFatal
(
"select count(*) from experiments where "
.
"state='swapped'"
);
if
(
mysql_num_rows
(
$query_result
)
!=
1
)
{
$swapped_expts
=
"ERR"
;
}
else
{
$row
=
mysql_fetch_array
(
$query_result
);
$swapped_expts
=
$row
[
0
];
}
$query_result
=
DBQueryFatal
(
"select count(*) from experiments where "
.
"swap_requests > 0"
);
if
(
mysql_num_rows
(
$query_result
)
!=
1
)
{
$idle_expts
=
"ERR"
;
}
else
{
$row
=
mysql_fetch_array
(
$query_result
);
$idle_expts
=
$row
[
0
];
}
?>
<center>
<table
align=
"right"
>
<tr><th
colspan=
2"
class=
"contentheader"
align=
"center"
>
Current Experiments
</th></tr>
<tr><td
align=
"right"
class=
"menuopt"
>
<?php
echo
$active_expts
?>
</td>
<td
align=
"left"
class=
"menuopt"
>
Active
</td></tr>
<tr><td
align=
"right"
class=
"menuopt"
>
<?php
echo
$idle_expts
?>
</td>
<td
align=
"left"
class=
"menuopt"
>
Idle
</td></tr>
<tr><td
align=
"right"
class=
"menuopt"
>
<?php
echo
$swapped_expts
?>
</td>
<td
align=
"left"
class=
"menuopt"
>
Swapped
</td></tr>
</table>
</center>
<p><em>
Netbed
</em>
, an outgrowth of
<em>
Emulab
</em>
, provides
integrated access to three disparate experimental environments:
simulated, emulated, and wide-area network testbeds. Netbed strives
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment