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
18c8a948
Commit
18c8a948
authored
Feb 13, 2007
by
Jonathon Duerig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added logging to try to find two bugs.
parent
f1be0720
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
14 deletions
+27
-14
pelab/magent/Connection.cc
pelab/magent/Connection.cc
+5
-2
pelab/magent/DirectInput.cc
pelab/magent/DirectInput.cc
+5
-1
pelab/magent/KernelTcp.cc
pelab/magent/KernelTcp.cc
+8
-4
pelab/monitor/monitor.py
pelab/monitor/monitor.py
+9
-7
No files found.
pelab/magent/Connection.cc
View file @
18c8a948
...
...
@@ -117,7 +117,7 @@ void Connection::connect(unsigned int ip)
isConnected
=
peer
->
isConnected
();
if
(
isConnected
)
{
logWrite
(
CONNECTION
,
"Inserting a connection with key
%s"
,
logWrite
(
PCAP
,
"Inserting key:
%s"
,
planet
.
toString
().
c_str
());
global
::
planetMap
[
planet
]
=
this
;
}
...
...
@@ -185,6 +185,8 @@ Time Connection::writeToConnection(Time const & previousTime)
if
(
!
isConnected
&&
result
.
isConnected
)
{
planet
=
result
.
planet
;
logWrite
(
PCAP
,
"Inserting key: %s"
,
planet
.
toString
().
c_str
());
global
::
planetMap
[
planet
]
=
this
;
}
else
if
(
isConnected
&&
result
.
isConnected
...
...
@@ -193,8 +195,9 @@ Time Connection::writeToConnection(Time const & previousTime)
logWrite
(
CONNECTION
,
"OldKey: %s"
,
planet
.
toString
().
c_str
());
global
::
planetMap
[
planet
]
=
NULL
;
planet
=
result
.
planet
;
logWrite
(
PCAP
,
"Inserting key: %s"
,
planet
.
toString
().
c_str
());
global
::
planetMap
[
planet
]
=
this
;
logWrite
(
CONNECTION
,
"NewKey: %s"
,
planet
.
toString
().
c_str
());
}
isConnected
=
result
.
isConnected
;
bufferFull
=
result
.
bufferFull
;
...
...
pelab/magent/DirectInput.cc
View file @
18c8a948
...
...
@@ -65,7 +65,11 @@ void DirectInput::nextCommand(fd_set * readable)
if
(
error
==
Header
::
PREFIX_SIZE
-
index
)
{
unsigned
char
version
=
headerBuffer
[
Header
::
PREFIX_SIZE
-
1
];
global
::
CONTROL_VERSION
=
version
;
if
(
global
::
CONTROL_VERSION
!=
version
)
{
logWrite
(
COMMAND_INPUT
,
"Setting version to %d"
,
version
);
global
::
CONTROL_VERSION
=
version
;
}
versionSize
=
Header
::
headerSize
();
index
+=
error
;
state
=
HEADER
;
...
...
pelab/magent/KernelTcp.cc
View file @
18c8a948
...
...
@@ -809,8 +809,10 @@ namespace
bool
outgoing
;
logWrite
(
PCAP
,
"Looking up key (outgoing): t=%d,i=%s,lp=%i,rp=%i"
,
transport
,
inet_ntoa
(
ipPacket
->
ip_dst
),
key
.
localPort
,
key
.
remotePort
);
// logWrite(PCAP,"Looking up key (outgoing): t=%d,i=%s,lp=%i,rp=%i",
// transport, inet_ntoa(ipPacket->ip_dst),key.localPort,key.remotePort);
logWrite
(
PCAP
,
"Looking up key (outgoing): %s"
,
key
.
toString
().
c_str
());
map
<
PlanetOrder
,
Connection
*>::
iterator
pos
;
pos
=
global
::
planetMap
.
find
(
key
);
...
...
@@ -821,8 +823,10 @@ namespace
swap
(
key
.
localPort
,
key
.
remotePort
);
// key.localPort = ntohs(tcpPacket->dest);
// key.remotePort = ntohs(tcpPacket->source);
logWrite
(
PCAP
,
"Looking up key (incoming): t=%d,i=%s,lp=%i,rp=%i"
,
transport
,
inet_ntoa
(
ipPacket
->
ip_src
),
key
.
localPort
,
key
.
remotePort
);
logWrite
(
PCAP
,
"Looking up key (incoming): %s"
,
key
.
toString
().
c_str
());
// logWrite(PCAP,"Looking up key (incoming): t=%d,i=%s,lp=%i,rp=%i",
// transport,inet_ntoa(ipPacket->ip_src),key.localPort,key.remotePort);
pos
=
global
::
planetMap
.
find
(
key
);
if
(
pos
!=
global
::
planetMap
.
end
())
{
outgoing
=
false
;
...
...
pelab/monitor/monitor.py
View file @
18c8a948
...
...
@@ -492,14 +492,15 @@ def send_write(conn, key, timestamp, app_connection, size):
def
receive_characteristic
(
conn
):
global
socket_map
buf
=
conn
.
recv
(
36
)
if
len
(
buf
)
!=
36
:
raise
Exception
(
'ERROR: Event header is the wrong size. Length: '
+
str
(
len
(
buf
)))
eventType
=
load_char
(
buf
[
0
:
1
]);
size
=
load_short
(
buf
[
1
:
3
]);
version
=
load_char
(
buf
[
3
:
4
]);
if
version
!=
magent_version
:
raise
Exception
(
'ERROR: Wrong version from magent.'
);
raise
Exception
(
'ERROR: Wrong version from magent: version('
+
str
(
version
)
+
') buf_size('
+
len
(
buf
)
+
')'
);
if
len
(
buf
)
!=
36
:
raise
Exception
(
'ERROR: Event header is the wrong size. Length: '
+
str
(
len
(
buf
)))
socketKey
=
buf
[
4
:
34
];
connectionKey
=
load_short
(
buf
[
34
:
36
]);
...
...
@@ -550,7 +551,8 @@ def receive_characteristic(conn):
else
:
sys
.
stdout
.
write
(
'Recieve: Ignored TENTATIVE_THROUGHPUT for '
+
app_connection
.
dest
.
remote_ip
+
' - '
+
buf
+
' vs '
+
app_connection
.
last_bandwidth
+
'
\n
'
)
+
buf
+
' vs '
+
str
(
app_connection
.
last_bandwidth
)
+
'
\n
'
)
elif
eventType
==
AUTHORITATIVE_BANDWIDTH
and
int
(
buf
)
>
0
:
# We know that the bandwidth has definitely changed. Reset everything.
app_connection
.
last_bandwidth
=
int
(
buf
)
...
...
@@ -607,8 +609,8 @@ def set_link(source, dest, ending, event_type='MODIFY'):
def
send_command
(
conn
,
key
,
command_id
,
command
):
if
is_fake
:
sys
.
stdout
.
write
(
'Command: '
+
key
+
'
'
+
command_to_string
[
command_id
]
+
'
\n
'
)
sys
.
stdout
.
write
(
'Command: '
+
key
+
'
version('
+
str
(
magent_version
)
+
'
) '
+
command_to_string
[
command_id
]
+
'
\n
'
)
return
output
=
(
save_char
(
command_id
)
+
save_short
(
len
(
command
))
...
...
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