osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-dev/+/27267 )
Change subject: net/templates/run.sh: put log name in trace.pcap
......................................................................
net/templates/run.sh: put log name in trace.pcap
It's hard to distinguish multiple wireshark windows with trace.pcap
files, as only the file name and not the path is shown in the title.
Make it easier to distinguish them by adding the log name to the file
name.
Change-Id: I7007d7c1e74aef46f1942f4f6f675adebb890955
---
M net/templates/run.sh
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, approved; Verified
diff --git a/net/templates/run.sh b/net/templates/run.sh
index 64419a6..0a8cfb1 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -298,11 +298,13 @@
newlogdir="log/$log_name"
#scp "bts:/tmp/{bts,pcu}.log" "bts:neels/osmo-{bts,pcu}.cfg"
"$logdir"
else
- newlogdir="autolog/log_$(date +%Y-%m-%d_%H-%M-%S)"
+ log_name="log_$(date +%Y-%m-%d_%H-%M-%S)"
+ newlogdir="autolog/$log_name"
fi
mkdir -p "$(dirname "$newlogdir")"
mergecap -w "$logdir/trace.pcap" "$logdir/"*.single.pcap &&
rm -f "$logdir/"*.single.pcap
+mv "$logdir/trace.pcap" "$logdir/trace-$log_name.pcap"
if [ -x "$newlogdir" ]; then
echo "already exists, move it manually: $newlogdir"
--
To view, visit
https://gerrit.osmocom.org/c/osmo-dev/+/27267
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I7007d7c1e74aef46f1942f4f6f675adebb890955
Gerrit-Change-Number: 27267
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged