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
1f4fbb86
Commit
1f4fbb86
authored
Sep 14, 2021
by
Hejing Li
Committed by
Antoine Kaufmann
Jan 17, 2022
Browse files
pktgen script done
parent
41efa772
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
experiments/pyexps/pktgen.sh
experiments/pyexps/pktgen.sh
+14
-2
No files found.
experiments/pyexps/pktgen.sh
View file @
1f4fbb86
...
...
@@ -4,13 +4,15 @@ SIMBRICKS_DIR="/DS/endhost-networking/work/sim/hejing/simbricks"
RUN_DIR
=
"/tmp/hejing-work/pktgen"
NUM_HOST
=
$1
ALL_PIDS
=
""
PKTGEN_PIDS
=
""
# -inst num
run_pktgen
(){
echo
"starting host
$1
"
PKTGEN_EXE
=
/DS/endhost-networking/work/sim/hejing/simbricks/sims/net/pktgen/pktgen
$PKTGEN_EXE
-m
0
-S
500
-E
500
-h
$RUN_DIR
/eth.
$1
&
$PKTGEN_EXE
-m
0
-S
500
-E
500
-n
$1
-h
$RUN_DIR
/eth.
$1
&
pid
=
$!
ALL_PIDS
=
"
$ALL_PIDS
$pid
"
PKTGEN_PIDS
=
"
$PKTGEN_PIDS
$pid
"
return
$pid
}
...
...
@@ -50,6 +52,7 @@ sighandler(){
}
trap
"sighandler"
SIGINT
date
rm
-rf
$RUN_DIR
mkdir
-p
$RUN_DIR
r
=
0
...
...
@@ -60,4 +63,13 @@ do
done
sleep
2
run_switch
$1
\ No newline at end of file
run_switch
$1
SWITCH_PID
=
$!
for
p
in
$PKTGEN_PIDS
;
do
wait
$p
done
echo
"kill switch"
kill
-9
$SWITCH_PID
date
\ No newline at end of file
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