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
a0a100b4
Commit
a0a100b4
authored
Aug 03, 2007
by
Jonathon Duerig
Browse files
Added fixes. Now invokes dump2filter.
parent
e5267ef4
Changes
1
Show whitespace changes
Inline
Side-by-side
pelab/bw-bottleneck/sharedBottle.pl
View file @
a0a100b4
...
...
@@ -16,23 +16,22 @@ my $newProjName;
%bottleNecks
=
{};
my
%nodeClasses
;
die
"
Usage: perl sharedBottle.pl proj_name exp_name
logsDirectory
newProj_name newExp_name
"
if
(
@ARGV
<
5
);
die
"
Usage: perl sharedBottle.pl proj_name exp_name newProj_name newExp_name
"
if
(
@ARGV
<
4
);
$expName
=
$ARGV
[
0
];
$projName
=
$ARGV
[
1
];
$projName
=
$ARGV
[
0
];
$expName
=
$ARGV
[
1
];
$newProjName
=
$ARGV
[
2
];
$newExpName
=
$ARGV
[
3
];
$logsDir
=
$ARGV
[
2
]
;
$logsDir
=
"
/proj/
$projName
/exp/
$expName
/logs/dump
"
;
$newExpName
=
$ARGV
[
3
];
$newProjName
=
$ARGV
[
4
];
# Get the initial conditions.
$elabInitScript
=
"
/p
ath/to
/init-elabnodes.pl
";
$initConditionsCommand
=
$elabInitScript
.
"
-o /tmp/initial-conditions.txt
"
.
$
p
rojName
.
"
"
.
$
e
xpName
;
$elabInitScript
=
"
/p
roj/tbres/duerig/testbed/pelab
/init-elabnodes.pl
";
$initConditionsCommand
=
$elabInitScript
.
"
-o /tmp/initial-conditions.txt
"
.
$
newP
rojName
.
"
"
.
$
newE
xpName
;
#FIXME
#system($initConditionsCommand);
system
(
$initConditionsCommand
);
open
(
CONDITIONS
,
"
/tmp/initial-conditions.txt
");
...
...
@@ -128,17 +127,17 @@ foreach $sourceName (readdir(logsDirHandle))
# Run Rubenstein's code on the ".filter" files
# inside the second destination directory.
#FIXME
$DansScript
=
"
/
script/somewhere/xyz.sh
";
$filterFile1
=
$destTwo
.
"
/
"
.
"
file1
.filter
";
$filterFile2
=
$destTwo
.
"
/
"
.
"
file2
.filter
";
$filterFile3
=
$destTwo
.
"
/
"
.
"
file3
.filter
";
`
perl /proj/tbres/duerig/testbed/pelab/bw-bottleneck/dump2filter.pl
$destTwo
`;
$DansScript
=
"
/
proj/tbres/duerig/filter/genjitco.FreeBSD
";
$filterFile1
=
$destTwo
.
"
/
"
.
"
source
.filter
";
$filterFile2
=
$destTwo
.
"
/
"
.
"
dest1
.filter
";
$filterFile3
=
$destTwo
.
"
/
"
.
"
dest2
.filter
";
$sharedBottleneckCheck
=
$DansScript
.
$filterFile1
.
$filterFile2
.
$filterFile3
.
"
|
";
$sharedBottleneckCheck
=
$DansScript
.
"
"
.
$filterFile1
.
"
"
.
$filterFile2
.
"
"
.
$filterFile3
;
my
@scriptOutput
=
();
#FIXME
#$scriptOutput = `$sharedBottleneckCheck`;
@scriptOutput
=
`
$sharedBottleneckCheck
| tail -n 2
`;
$scriptOutput
[
0
]
=
"
last CHANGE was CORRELATED, corr case: 30203 pkts, test case: 30203 pkts
";
$scriptOutput
[
1
]
=
"
testingabcdef
";
...
...
@@ -146,16 +145,16 @@ foreach $sourceName (readdir(logsDirHandle))
# "CORRELATED" means that these two nodes have
# a shared bottleneck.
if
(
$scriptOutput
[
$#scriptOutput
-
1
]
=~
/
(\w*)\s
CHANGE\s(\w*)\s(\w*)\,[\w\d\W\:\,]*/
)
if
(
$scriptOutput
[
$#scriptOutput
-
1
]
=~
/
last
CHANGE\s(\w*)\s(\w*)\,[\w\d\W\:\,]*/
)
{
if
(
$
3
eq
"
CORRELATED
")
if
(
$
2
eq
"
CORRELATED
")
{
push
(
@
{
$bottleNecks
{
$sourceName
}
},
$destOne
.
"
:
"
.
$destTwo
);
push
(
@destLists
,
$destOne
);
push
(
@destLists
,
$destTwo
);
}
elsif
(
$
3
eq
"
UNCORRELATED
")
elsif
(
$
2
eq
"
UNCORRELATED
")
{
push
(
@destLists
,
$destOne
);
push
(
@destLists
,
$destTwo
);
...
...
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