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
6bdb528b
Commit
6bdb528b
authored
Aug 03, 2007
by
Jonathon Duerig
Browse files
Final fixes. Sends correct events. Sends spurious events?!?!?
parent
776fd257
Changes
1
Hide whitespace changes
Inline
Side-by-side
pelab/bw-bottleneck/sharedBottle.pl
View file @
6bdb528b
...
@@ -124,23 +124,24 @@ foreach $sourceName (readdir(logsDirHandle))
...
@@ -124,23 +124,24 @@ foreach $sourceName (readdir(logsDirHandle))
{
{
if
(
(
-
d
$logsDir
.
"
/
"
.
$sourceName
.
"
/
"
.
$destOne
.
"
/
"
.
$destTwo
)
&&
$destTwo
ne
"
.
"
&&
$destTwo
ne
"
..
"
)
if
(
(
-
d
$logsDir
.
"
/
"
.
$sourceName
.
"
/
"
.
$destOne
.
"
/
"
.
$destTwo
)
&&
$destTwo
ne
"
.
"
&&
$destTwo
ne
"
..
"
)
{
{
$fullPath
=
"
$logsDir
/
$sourceName
/
$destOne
/
$destTwo
";
# Run Rubenstein's code on the ".filter" files
# Run Rubenstein's code on the ".filter" files
# inside the second destination directory.
# inside the second destination directory.
`
perl /proj/tbres/duerig/testbed/pelab/bw-bottleneck/dump2filter.pl
$
destTwo
`;
`
perl /proj/tbres/duerig/testbed/pelab/bw-bottleneck/dump2filter.pl
$
fullPath
`;
$DansScript
=
"
/proj/tbres/duerig/filter/genjitco.FreeBSD
";
$DansScript
=
"
/proj/tbres/duerig/filter/genjitco.FreeBSD
";
$filterFile1
=
$
destTwo
.
"
/
"
.
"
source.filter
";
$filterFile1
=
$
fullPath
.
"
/
"
.
"
source.filter
";
$filterFile2
=
$
destTwo
.
"
/
"
.
"
dest1.filter
";
$filterFile2
=
$
fullPath
.
"
/
"
.
"
dest1.filter
";
$filterFile3
=
$
destTwo
.
"
/
"
.
"
dest2.filter
";
$filterFile3
=
$
fullPath
.
"
/
"
.
"
dest2.filter
";
$sharedBottleneckCheck
=
$DansScript
.
"
"
.
$filterFile1
$sharedBottleneckCheck
=
$DansScript
.
"
"
.
$filterFile1
.
"
"
.
$filterFile2
.
"
"
.
$filterFile3
;
.
"
"
.
$filterFile2
.
"
"
.
$filterFile3
;
print
"
EXECUTE:
$sharedBottleneckCheck
\n
";
my
@scriptOutput
=
();
my
@scriptOutput
=
();
@scriptOutput
=
`
$sharedBottleneckCheck
| tail -n 2
`;
@scriptOutput
=
`
$sharedBottleneckCheck
| tail -n 2
`;
$scriptOutput
[
0
]
=
"
last CHANGE was CORRELATED, corr case: 30203 pkts, test case: 30203 pkts
";
#
$scriptOutput[0] = "last CHANGE was CORRELATED, corr case: 30203 pkts, test case: 30203 pkts";
$scriptOutput
[
1
]
=
"
testingabcdef
";
#
$scriptOutput[1] = "testingabcdef";
# "CORRELATED" means that these two nodes have
# "CORRELATED" means that these two nodes have
# a shared bottleneck.
# a shared bottleneck.
...
@@ -334,7 +335,7 @@ foreach $sourceName (readdir(logsDirHandle))
...
@@ -334,7 +335,7 @@ foreach $sourceName (readdir(logsDirHandle))
# Create & send events.
# Create & send events.
# Get initial conditions for the paths of interest
# Get initial conditions for the paths of interest
# from the database, using init-elabnodes.pl
# from the database, using init-elabnodes.pl
my
$tevc
=
"
tevc -e
$newProjName
/
$newExpName
now
";
my
$tevc
=
"
/usr/testbed/bin/
tevc -e
$newProjName
/
$newExpName
now
";
`
$tevc
elabc reset
`;
`
$tevc
elabc reset
`;
`
$tevc
elabc create start
`;
`
$tevc
elabc create start
`;
...
@@ -373,13 +374,13 @@ foreach $sourceName (readdir(logsDirHandle))
...
@@ -373,13 +374,13 @@ foreach $sourceName (readdir(logsDirHandle))
$delayEventCommand
=
$delayEventCommand
.
"
"
.
"
DELAY=
"
.
$delayMap
{
$addrNodeMapping
{
$sourceName
}}{
$addrNodeMapping
{
$destSeen
[
$tmpName2
]}};
$delayEventCommand
=
$delayEventCommand
.
"
"
.
"
DELAY=
"
.
$delayMap
{
$addrNodeMapping
{
$sourceName
}}{
$addrNodeMapping
{
$destSeen
[
$tmpName2
]}};
# Execute the delay event command.
# Execute the delay event command.
print
"
EXECUTE
$delayEventCommand
\n
";
#
print "EXECUTE $delayEventCommand\n";
#`$delayEventCommand`;
#`$delayEventCommand`;
}
}
$bwEventCommand
=
$bwEventCommand
.
"
"
.
"
BANDWIDTH=
"
.
$maxBw
;
$bwEventCommand
=
$bwEventCommand
.
"
"
.
"
BANDWIDTH=
"
.
$maxBw
;
# Execute the event to set the bandwidth for this equivalence class.
# Execute the event to set the bandwidth for this equivalence class.
print
"
EXECUTE
$bwEventCommand
\n
";
print
"
EXECUTE
$bwEventCommand
\n
";
#
`$bwEventCommand`;
`
$bwEventCommand
`;
}
}
# Create and send events for all the loner dest nodes reachable from this source node.
# Create and send events for all the loner dest nodes reachable from this source node.
...
@@ -399,18 +400,18 @@ foreach $sourceName (readdir(logsDirHandle))
...
@@ -399,18 +400,18 @@ foreach $sourceName (readdir(logsDirHandle))
{
{
my
$bwEventCommand
=
"
$tevc
$elabMap
{
$addrNodeMapping
{
$sourceName
}} modify DEST=
";
my
$bwEventCommand
=
"
$tevc
$elabMap
{
$addrNodeMapping
{
$sourceName
}} modify DEST=
";
$bwEventCommand
=
$bwEventCommand
.
$addrNodeMapping
{
$destSeen
[
$i
]};
$bwEventCommand
=
$bwEventCommand
.
$addrNodeMapping
{
$destSeen
[
$i
]};
$bwEventCommand
=
$bwEventCommand
.
$bwMap
{
$addrNodeMapping
{
$sourceName
}}{
$addrNodeMapping
{
$destSeen
[
$i
]}};
$bwEventCommand
=
$bwEventCommand
.
"
BANDWIDTH=
"
.
$bwMap
{
$addrNodeMapping
{
$sourceName
}}{
$addrNodeMapping
{
$destSeen
[
$i
]}};
# Execute the event to set the bandwidth for this path.
# Execute the event to set the bandwidth for this path.
print
"
EXECUTE:
$bwEventCommand
\n
";
print
"
EXECUTE:
$bwEventCommand
\n
";
#
`$bwEventCommand`;
`
$bwEventCommand
`;
my
$delayEventCommand
=
"
$tevc
$elabMap
{
$addrNodeMapping
{
$sourceName
}} modify DEST=
"
.
$addrNodeMapping
{
$destSeen
[
$i
]};
my
$delayEventCommand
=
"
$tevc
$elabMap
{
$addrNodeMapping
{
$sourceName
}} modify DEST=
"
.
$addrNodeMapping
{
$destSeen
[
$i
]};
$delayEventCommand
=
$delayEventCommand
.
"
"
.
"
DELAY=
"
.
$delayMap
{
$addrNodeMapping
{
$sourceName
}}{
$addrNodeMapping
{
$destSeen
[
$i
]}};
$delayEventCommand
=
$delayEventCommand
.
"
"
.
"
DELAY=
"
.
$delayMap
{
$addrNodeMapping
{
$sourceName
}}{
$addrNodeMapping
{
$destSeen
[
$i
]}};
# Execute the delay event command.
# Execute the delay event command.
print
"
EXECUTE:
$delayEventCommand
\n
";
#
print "EXECUTE: $delayEventCommand\n";
#`$delayEventCommand`;
#`$delayEventCommand`;
}
}
}
}
...
...
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