Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
41c73e6f
Commit
41c73e6f
authored
Jun 10, 2003
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Oops, forgot to switch the totals from days to hours.
parent
29463d50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
www/showsumstats.php3
www/showsumstats.php3
+24
-24
No files found.
www/showsumstats.php3
View file @
41c73e6f
...
...
@@ -151,16 +151,16 @@ function showsummary ($showby, $sortby) {
# Gather some totals first.
#
$pnode_total
=
0
;
$p
hours_total
=
0
;
$e
hours_total
=
0
;
$p
days_total
=
0
;
$e
days_total
=
0
;
while
(
$row
=
mysql_fetch_assoc
(
$query_result
))
{
$pnodes
=
$row
[
"allexpt_pnodes"
];
$p
hours
=
$row
[
"pnode_days"
];
$e
hours
=
$row
[
"expt_days"
];
$p
days
=
$row
[
"pnode_days"
];
$e
days
=
$row
[
"expt_days"
];
$pnode_total
+=
$pnodes
;
$p
hours_total
+=
$phour
s
;
$e
hours_total
+=
$ehour
s
;
$p
days_total
+=
$pday
s
;
$e
days_total
+=
$eday
s
;
}
SUBPAGESTART
();
...
...
@@ -171,11 +171,11 @@ function showsummary ($showby, $sortby) {
<tr><td nowrap align=right><b>Pnodes</b></td>
<td align=left>
$pnode_total
</td>
</tr>
<tr><td nowrap align=right><b>Pnode
Hour
s</b></td>
<td align=left>
$p
hour
s_total
</td>
<tr><td nowrap align=right><b>Pnode
Day
s</b></td>
<td align=left>
$p
day
s_total
</td>
</tr>
<tr><td nowrap align=right><b>Expt
Hour
s</b></td>
<td align=left>
$e
hour
s_total
</td>
<tr><td nowrap align=right><b>Expt
Day
s</b></td>
<td align=left>
$e
day
s_total
</td>
</tr>
</table>
\n
"
;
SUBMENUEND_2B
();
...
...
@@ -437,17 +437,17 @@ function showrange ($showby, $sortby, $range) {
# Gather some totals first.
#
$pnode_total
=
0
;
$p
hours_total
=
0
;
$e
hours_total
=
0
;
$p
days_total
=
0
;
$e
days_total
=
0
;
foreach
(
$table
as
$key
=>
$value
)
{
$pnodes
=
$value
[
"pnodes"
];
$p
hours
=
sprintf
(
"%.2f"
,
$value
[
"pseconds"
]
/
(
3600
*
24
));
$e
hours
=
sprintf
(
"%.2f"
,
$value
[
"eseconds"
]
/
(
3600
*
24
));
$p
days
=
sprintf
(
"%.2f"
,
$value
[
"pseconds"
]
/
(
3600
*
24
));
$e
days
=
sprintf
(
"%.2f"
,
$value
[
"eseconds"
]
/
(
3600
*
24
));
$pnode_total
+=
$pnodes
;
$p
hours_total
+=
$phour
s
;
$e
hours_total
+=
$ehour
s
;
$p
days_total
+=
$pday
s
;
$e
days_total
+=
$eday
s
;
}
SUBPAGESTART
();
...
...
@@ -458,11 +458,11 @@ function showrange ($showby, $sortby, $range) {
<tr><td nowrap align=right><b>Pnodes</b></td>
<td align=left>
$pnode_total
</td>
</tr>
<tr><td nowrap align=right><b>Pnode
Hour
s</b></td>
<td align=left>
$p
hour
s_total
</td>
<tr><td nowrap align=right><b>Pnode
Day
s</b></td>
<td align=left>
$p
day
s_total
</td>
</tr>
<tr><td nowrap align=right><b>Expt
Hour
s</b></td>
<td align=left>
$e
hour
s_total
</td>
<tr><td nowrap align=right><b>Expt
Day
s</b></td>
<td align=left>
$e
day
s_total
</td>
</tr>
</table>
\n
"
;
SUBMENUEND_2B
();
...
...
@@ -491,8 +491,8 @@ function showrange ($showby, $sortby, $range) {
$heading
=
$key
;
$pnodes
=
$value
[
"pnodes"
];
$current
=
$value
[
"current"
];
$p
hours
=
sprintf
(
"%.2f"
,
$value
[
"pseconds"
]
/
(
3600
*
24
));
$e
hours
=
sprintf
(
"%.2f"
,
$value
[
"eseconds"
]
/
(
3600
*
24
));
$p
days
=
sprintf
(
"%.2f"
,
$value
[
"pseconds"
]
/
(
3600
*
24
));
$e
days
=
sprintf
(
"%.2f"
,
$value
[
"eseconds"
]
/
(
3600
*
24
));
# We caught a swapout, where the swapin was before the interval
# being looked at.
...
...
@@ -507,8 +507,8 @@ function showrange ($showby, $sortby, $range) {
echo
"<tr>
<td><A href='
$link
${heading}'>
$heading
$current
</A></td>
<td>
$pnodes
</td>
<td>
$p
hour
s
</td>
<td>
$e
hour
s
</td>
<td>
$p
day
s
</td>
<td>
$e
day
s
</td>
</tr>
\n
"
;
}
echo
"</table>
\n
"
;
...
...
Write
Preview
Markdown
is supported
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