Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
df69ef18
Commit
df69ef18
authored
Jun 09, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update wrapper scripts for client and server
parent
c4e9143f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
19 deletions
+96
-19
scripts/run_client
scripts/run_client
+45
-8
scripts/run_server
scripts/run_server
+51
-11
No files found.
scripts/run_client
View file @
df69ef18
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
script_dir
=
$(
dirname
$(
realpath
$0
))
script_dir
=
$(
dirname
$(
realpath
$0
))
usage
()
{
usage
()
{
echo
"Usage:
$0
-e delta | -p [-b] [-i INTERVAL] [-t] [-d TX_BUFFER_LEN
]"
1>&2
;
echo
"Usage:
$0
(-e delta | -p) [-bg] [-i INTERVAL] [-d TX_BUFFER_LEN] [emerald|slate|onyx
]"
1>&2
;
exit
1
;
exit
1
;
}
}
...
@@ -12,9 +12,11 @@ interval=100000
...
@@ -12,9 +12,11 @@ interval=100000
# Default options
# Default options
client_options
=
"-a -p 99 -f eth0"
client_options
=
"-a -p 99 -f eth0"
redirect
=
""
qdisc_options
=
""
qdisc_options
=
""
ip
=
"192.168.99."
while
getopts
"bd:e:
hi:pt
"
opt
;
do
while
getopts
"bd:e:
ghi:p
"
opt
;
do
case
"
${
opt
}
"
in
case
"
${
opt
}
"
in
b
)
b
)
client_options+
=
" -b"
client_options+
=
" -b"
...
@@ -25,7 +27,12 @@ while getopts "bd:e:hi:pt" opt; do
...
@@ -25,7 +27,12 @@ while getopts "bd:e:hi:pt" opt; do
e
)
e
)
use_etf
=
1
use_etf
=
1
client_options+
=
" -e -q 7"
client_options+
=
" -e -q 7"
qdisc_options+
=
"-e
${
OPTARG
}
"
delta
=
${
OPTARG
}
qdisc_options+
=
"-e
$delta
"
;;
g
)
client_options+
=
" -g -t"
use_histogram
=
1
;;
;;
h
)
h
)
usage
usage
...
@@ -39,9 +46,6 @@ while getopts "bd:e:hi:pt" opt; do
...
@@ -39,9 +46,6 @@ while getopts "bd:e:hi:pt" opt; do
client_options+
=
" -q 1"
client_options+
=
" -q 1"
qdisc_options+
=
"-p"
qdisc_options+
=
"-p"
;;
;;
t
)
client_options+
=
" -t"
;;
*
)
*
)
usage
usage
;;
;;
...
@@ -49,6 +53,22 @@ while getopts "bd:e:hi:pt" opt; do
...
@@ -49,6 +53,22 @@ while getopts "bd:e:hi:pt" opt; do
done
done
shift
$((
OPTIND-1
))
shift
$((
OPTIND-1
))
if
[
-n
"
$1
"
]
;
then
if
[
"
$1
"
==
"emerald"
]
;
then
ip+
=
"25"
elif
[
"
$1
"
==
"slate"
]
;
then
ip+
=
"26"
elif
[
"
$1
"
==
"onyx"
]
;
then
ip+
=
"27"
else
usage
exit
1
fi
else
ip+
=
"25"
fi
if
[
-z
"
${
use_etf
}
"
]
&&
[
-z
"
${
use_pfast
}
"
]
;
then
if
[
-z
"
${
use_etf
}
"
]
&&
[
-z
"
${
use_pfast
}
"
]
;
then
usage
usage
fi
fi
...
@@ -56,8 +76,25 @@ if [ -n "${use_etf}" ] && [ -n "${use_pfast}" ]; then
...
@@ -56,8 +76,25 @@ if [ -n "${use_etf}" ] && [ -n "${use_pfast}" ]; then
usage
usage
fi
fi
if
[
-z
"
${
use_histogram
}
"
]
;
then
client_options+
=
" -v"
else
output
=
"client_i
${
interval
}
"
if
[
-n
"
${
use_pfast
}
"
]
;
then
output+
=
"_pfast"
else
output+
=
"_etf_
${
delta
}
"
fi
redirect+
=
">
$output
;mv
$output
~/"
fi
client_options+
=
" -i
$interval
"
echo
"create_qdisc
$qdisc_options
"
;
echo
"create_qdisc
$qdisc_options
"
;
$script_dir
/create_qdisc
$qdisc_options
;
$script_dir
/create_qdisc
$qdisc_options
;
echo
"client_arm
$client_options
-i
$interval
192.168.99.25"
;
echo
"make client"
;
$script_dir
/../packet-exchange/build/client_arm
$client_options
-i
$interval
192.168.99.25
;
$script_dir
/../packet-exchange/build/make client
;
echo
"client
$client_options
$ip
$redirect
"
;
$script_dir
/../packet-exchange/build/client
$client_options
$ip
$redirect
;
scripts/run_server
View file @
df69ef18
...
@@ -3,25 +3,37 @@
...
@@ -3,25 +3,37 @@
script_dir
=
$(
dirname
$(
realpath
$0
))
script_dir
=
$(
dirname
$(
realpath
$0
))
usage
()
{
usage
()
{
echo
"Usage:
$0
[[-b
] | -t
NB_PACKETS]"
1>&2
;
echo
"Usage:
$0
[[-b
t] [-g INTERVAL]] | -d
NB_PACKETS]"
1>&2
;
exit
1
;
exit
1
;
}
}
server_options
=
"-a -p 99"
# Default options
server_options
=
"-a -p 99"
server_options
=
"-a -p 99 -f eth0"
redirect
=
""
ip
=
"192.168.99."
while
getopts
"b
ht
:"
opt
;
do
while
getopts
"b
:htd:g
:"
opt
;
do
case
"
${
opt
}
"
in
case
"
${
opt
}
"
in
b
)
b
)
server_options+
=
" -b 192.168.99.26"
use_rtt
=
1
board
=
${
OPTARG
}
;;
d
)
use_tcpdump
=
1
nb_packets
=
${
OPTARG
}
;;
g
)
interval
=
${
OPTARG
}
server_options+
=
" -g -i
$interval
"
use_histogram
=
1
;;
;;
h
)
h
)
usage
usage
exit
1
exit
1
;;
;;
t
)
t
)
use_tcpdump
=
1
server_options+
=
" -t"
nb_packets
=
${
OPTARG
}
exit
1
;;
;;
*
)
*
)
usage
usage
...
@@ -31,14 +43,42 @@ done
...
@@ -31,14 +43,42 @@ done
shift
$((
OPTIND-1
))
shift
$((
OPTIND-1
))
if
[
-n
"
${
use_rtt
}
"
]
;
then
if
[
"
$board
"
==
"emerald"
]
;
then
ip+
=
"25"
elif
[
"
$board
"
==
"slate"
]
;
then
ip+
=
"26"
elif
[
"
$board
"
==
"onyx"
]
;
then
ip+
=
"27"
else
usage
exit
1
fi
server_options+
=
" -b
$ip
"
fi
if
[
-z
"
${
use_histogram
}
"
]
;
then
server_options+
=
" -v"
else
output
=
"server_i
${
interval
}
"
redirect+
=
">
$output
;mv
$output
~/"
fi
if
[
-n
"
${
use_tcpdump
}
"
]
;
then
if
[
-n
"
${
use_tcpdump
}
"
]
;
then
echo
"tcpdump -c
$nb_packets
-i eth0 -w tmp.pcap -tt --time-stamp-precision=nano udp port 50000"
;
echo
"tcpdump -c
$nb_packets
-i eth0 -w tmp.pcap -tt --time-stamp-precision=nano udp port 50000"
;
tcpdump
-c
$nb_packets
-i
eth0
-w
tmp.pcap
-tt
--time-stamp-precision
=
nano udp port 50000
;
tcpdump
-c
$nb_packets
-i
eth0
-w
tmp.pcap
-tt
--time-stamp-precision
=
nano udp port 50000
;
echo
"tshark -r tmp.pcap --disable-protocol dcp-etsi --disable-protocol dcp-pft -t e -E separator=, -T fields -e frame.number -e frame.time_epoch -e data.data > tmp.out"
;
echo
"tshark -r tmp.pcap --disable-protocol dcp-etsi --disable-protocol dcp-pft -t e -E separator=, -T fields -e frame.number -e frame.time_epoch -e data.data > tmp.out"
;
tshark
-r
tmp.pcap
--disable-protocol
dcp-etsi
--disable-protocol
dcp-pft
-t
e
-E
separator
=
,
-T
fields
-e
frame.number
-e
frame.time_epoch
-e
data.data
>
tmp.out
;
tshark
-r
tmp.pcap
--disable-protocol
dcp-etsi
--disable-protocol
dcp-pft
-t
e
-E
separator
=
,
-T
fields
-e
frame.number
-e
frame.time_epoch
-e
data.data
>
tmp.out
;
echo
"txtime_stats.py -f tmp.out"
;
$script_dir
/txtime_stats.py
-f
tmp.out
;
echo
"txtime_stats.py -f server_pcap_stats"
;
$script_dir
/txtime_stats.py
-f
server_pcap_stats
;
else
else
echo
"server_arm
$server_options
"
;
$script_dir
/../packet-exchange/build/server_arm
$server_options
;
echo
"make server"
;
$script_dir
/../packet-exchange/build/make server
;
echo
"server
$server_options
$redirect
"
;
$script_dir
/../packet-exchange/build/server
$server_options
$redirect
;
fi
fi
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