mirror of https://gerrit.osmocom.org/osmo-dev
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: I7007d7c1e74aef46f1942f4f6f675adebb890955changes/67/27267/1
parent
e33f85f193
commit
2cfd792312
|
@ -298,11 +298,13 @@ if [ -n "$log_name" ]; then
|
|||
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"
|
||||
|
|
Loading…
Reference in New Issue