Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
36345fd8
Commit
36345fd8
authored
Jan 04, 2006
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print out card,port and switch info for node, when in admin mode.
Helpful for debugging things like linktest.
parent
ce718d38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
www/showstuff.php3
www/showstuff.php3
+35
-0
No files found.
www/showstuff.php3
View file @
36345fd8
...
...
@@ -2493,6 +2493,41 @@ function SHOWNODE($node_id, $flags = 0) {
<td class=left>
$type
(
$man
$model
;
$protocols
)</td>
</tr>
\n
"
;
}
#
# Switch info. Very useful for debugging.
#
if
(
!
$noperm
)
{
$query_result
=
DBQueryFatal
(
"select i.*,w.* from interfaces as i "
.
"left join wires as w on i.node_id=w.node_id1 "
.
" and i.card=w.card1 and i.port=w.port1 "
.
"where i.node_id='
$node_id
' and "
.
" w.node_id1 is not null "
.
"order by iface"
);
echo
"<tr></tr><tr>
<td align=center colspan=2>Switch Info</td>
</tr>
\n
"
;
echo
"<tr><th>Iface:role   card,port</th>
<th>Switch   card,port</th>
\n
"
;
while
(
$row
=
mysql_fetch_array
(
$query_result
))
{
$iface
=
$row
[
"iface"
];
$role
=
$row
[
"role"
];
$card
=
$row
[
"card1"
];
$port
=
$row
[
"port1"
];
$switch
=
$row
[
"node_id2"
];
$switch_card
=
$row
[
"card2"
];
$switch_port
=
$row
[
"port2"
];
echo
"<tr>
<td>
$iface
:
$role
 
$card
,
$port
</td>
<td class=left>"
.
"
$switch
:  
$switch_card
,
$switch_port
</td>
</tr>
\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