Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
a002814c
Commit
a002814c
authored
Nov 23, 2020
by
Hejing Li
Browse files
add ns-3 dctcp experiment run script
parent
ce0d1366
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
experiments/pyexps/ns3-dctcp.sh
experiments/pyexps/ns3-dctcp.sh
+66
-0
No files found.
experiments/pyexps/ns3-dctcp.sh
0 → 100755
View file @
a002814c
#!/bin/bash
EHSIM_BASE
=
"
$(
readlink
-f
$(
dirname
${
BASH_SOURCE
[0]
}
)
/../..
)
"
NS3_BASE
=
"
$EHSIM_BASE
/ns-3"
cd
$NS3_BASE
mtu
=
1500
k_start
=
0
k_end
=
199680
#k_end=0
k_step
=
8320
cores
=
$1
echo
$cores
proc
=
0
pids
=
""
for
k
in
$(
seq
$k_start
$k_step
$k_end
)
do
#echo $k
for
m
in
1500 4000 9000
# MTU size
do
echo
"K:
$k
MtU:
$m
"
./cosim-dctcp-run.sh
$k
$m
&
pid
=
$!
pids
=
"
$pids
$pid
"
proc
=
$((
$proc
+
1
))
if
[
$proc
-eq
$cores
]
;
then
for
p
in
$pids
;
do
wait
$p
done
proc
=
0
pids
=
""
fi
done
done
for
p
in
$pids
;
do
wait
$p
done
cleanup
()
{
echo
Cleaning up
for
p
in
$pids
;
do
kill
$p
&>/dev/null
done
sleep
1
for
p
in
$pids
;
do
kill
-KILL
$p
&>/dev/null
done
}
sighandler
()
{
echo
"Caught Interrupt, aborting...."
cleanup
exit
1
}
trap
"sighandler"
SIGINT
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