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
99dcbff7
Commit
99dcbff7
authored
Aug 26, 2020
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add kill-test-board-synchro script, add tracing option, remove exit placed during debug
parent
aa3d0fb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
7 deletions
+55
-7
scripts/kill-test-board-synchro
scripts/kill-test-board-synchro
+38
-0
scripts/run-server
scripts/run-server
+1
-1
scripts/test-board-synchro
scripts/test-board-synchro
+16
-6
No files found.
scripts/kill-test-board-synchro
0 → 100755
View file @
99dcbff7
#!/bin/bash
usage
()
{
cat
<<
ENDUSAGE
Usage:
$0
[-h] BOARD1_HOSTNAME BOARD2_HOSTNAME
Kills all processes started by test-board-synchro (ptp4l, client, server)
-h Show help
ENDUSAGE
1>&2
;
exit
1
;
}
while
getopts
"hc:i:o:rsT"
opt
;
do
case
"
${
opt
}
"
in
h
)
usage
;;
*
)
usage
;;
esac
done
shift
$((
OPTIND-1
))
board1
=
$1
board2
=
$2
killall ptp4l
;
killall phc2sys
;
killall client
;
killall run-client
;
./sudossh
$board1
"killall ptp4l"
;
./sudossh
$board1
"killall server"
;
./sudossh
$board2
"killall ptp4l"
;
./sudossh
$board2
"killall server"
;
scripts/run-server
View file @
99dcbff7
...
@@ -30,7 +30,7 @@ Usage: $0 [-h] [-I if] [SERVER] | TCPDUMP [TRACE_OPTS]
...
@@ -30,7 +30,7 @@ Usage: $0 [-h] [-I if] [SERVER] | TCPDUMP [TRACE_OPTS]
Default: 1ms
Default: 1ms
TRACE_OPTS: -T LATENCY_THRESHOLD [-P TRACER -E XDP_EVENTS]
TRACE_OPTS: -T LATENCY_THRESHOLD [-P TRACER -E XDP_EVENTS]
Trace until latency threshold is met
Trace until latency threshold is met
-T
THRESHOLD
Enable tracing until threshold is met
-T
USEC
Enable tracing until threshold is met
-P TRACER Which trace to use when tracing: function, function_graph, wakeup etc...
-P TRACER Which trace to use when tracing: function, function_graph, wakeup etc...
Default: function
Default: function
-E EVENTS Specify which events to trace (e.g: "-E "-e net -e irq")
-E EVENTS Specify which events to trace (e.g: "-E "-e net -e irq")
...
...
scripts/test-board-synchro
View file @
99dcbff7
...
@@ -2,11 +2,12 @@
...
@@ -2,11 +2,12 @@
usage
()
{
usage
()
{
cat
<<
ENDUSAGE
cat
<<
ENDUSAGE
Usage:
$0
[-
i USEC -c USEC -s
] BOARD1_HOSTNAME BOARD2_HOSTNAME
Usage:
$0
[-
h] [-i USEC -c USEC -s] [-T
] BOARD1_HOSTNAME BOARD2_HOSTNAME
-h Show help
-h Show help
-i USEC Specify which interval to use in client
-i USEC Specify which interval to use in client
-c USEC Specify which offset to use for the timestamp in the packet
-c USEC Specify which offset to use for the timestamp in the packet
-s Use software timestampings
-s Use software timestampings
-T Enable tracing on the boards
BOARD_HOSTNAME Uses /etc/hosts to find the IP address associated to the hostname
BOARD_HOSTNAME Uses /etc/hosts to find the IP address associated to the hostname
ENDUSAGE
ENDUSAGE
1>&2
;
1>&2
;
...
@@ -15,9 +16,13 @@ ENDUSAGE
...
@@ -15,9 +16,13 @@ ENDUSAGE
}
}
interval
=
4000000
interval
=
4000000
server_opts
=
""
while
getopts
"
c:i:o:rs
"
opt
;
do
while
getopts
"
hc:i:o:rsT
"
opt
;
do
case
"
${
opt
}
"
in
case
"
${
opt
}
"
in
h
)
usage
;;
i
)
i
)
interval
=
${
OPTARG
}
interval
=
${
OPTARG
}
;;
;;
...
@@ -27,6 +32,9 @@ while getopts "c:i:o:rs" opt; do
...
@@ -27,6 +32,9 @@ while getopts "c:i:o:rs" opt; do
s
)
s
)
software_ts
=
1
software_ts
=
1
;;
;;
T
)
enable_tracing
=
1
;;
*
)
*
)
usage
usage
;;
;;
...
@@ -42,8 +50,6 @@ fi
...
@@ -42,8 +50,6 @@ fi
board1
=
$1
board1
=
$1
board2
=
$2
board2
=
$2
exit
# Setup irqs
# Setup irqs
ksoftirq1_pid
=
$(
ps
-eL
-o
pid,cmd |
grep
"ksoftirqd/1"
|
awk
'{ print $1 }'
|
head
-n1
)
ksoftirq1_pid
=
$(
ps
-eL
-o
pid,cmd |
grep
"ksoftirqd/1"
|
awk
'{ print $1 }'
|
head
-n1
)
...
@@ -95,8 +101,12 @@ echo "Start servers on slave";
...
@@ -95,8 +101,12 @@ echo "Start servers on slave";
./sudossh
$board1
"killall server"
;
./sudossh
$board1
"killall server"
;
./sudossh
$board2
"killall server"
;
./sudossh
$board2
"killall server"
;
./exec-ssh-nohup
$board1
"run-server -c"
;
if
[
-n
"
$enable_tracing
"
]
;
then
./exec-ssh-nohup
$board2
"run-server -c"
;
server_opts+
=
" -T
$((
interval
*
2
))
-B 100000"
fi
./exec-ssh-nohup
$board1
"run-server -c
$server_opts
"
;
./exec-ssh-nohup
$board2
"run-server -c
$server_opts
"
;
cd
../gettime/build
;
cd
../gettime/build
;
make
;
make
;
...
...
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