Commit 35802ac0 authored by Sagar Parsawar's avatar Sagar Parsawar

Additional changes to extract_prs_dump script

parent f0692c15
#!/bin/bash #!/bin/bash
: ${1?"Usage: $0 [-g num_gnb] [-n num_rsc] [-f filename]"} : ${1?"Usage: $0 [-g num_gnb] [-n num_rsc] [-f filename] [-c count]"}
# Usage info # Usage info
show_help() show_help()
{ {
echo " echo "
Usage with script arguments: [-g num_gnb] [-n num_rsc] [-f filename] Usage of script with arguments: [-g num_gnb] [-n num_rsc] [-f filename] [-c count]
-g num_gnb Number of active gNBs -g num_gnb Number of active gNBs
-n num_rsc Number of PRS resources -n num_rsc Number of PRS resources
-f filename T tracer recorded .raw filename -f filename T tracer recorded .raw filename
-c count Number of dump instances to be extacted
For Example: ./extract_prs_dumps.sh -g 1 -n 8 -f fr2_64_prbs.raw For Example: ./extract_prs_dumps.sh -g 1 -n 8 -f fr2_64_prbs.raw -c 100
-h Help -h Help
" "
exit 0 exit 0
} }
while getopts g:n:f:h flag while getopts g:n:f:c:h flag
do do
case "${flag}" in case "${flag}" in
g) num_gnb=${OPTARG};; g) num_gnb=${OPTARG};;
n) num_rsc=${OPTARG};; n) num_rsc=${OPTARG};;
f) file=${OPTARG};; f) file=${OPTARG};;
c) count=${OPTARG};;
h) show_help;; h) show_help;;
*) exit -1;; *) exit -1;;
esac esac
...@@ -31,6 +33,7 @@ done ...@@ -31,6 +33,7 @@ done
echo "num_gnb: $num_gnb"; echo "num_gnb: $num_gnb";
echo "num_rsc: $num_rsc"; echo "num_rsc: $num_rsc";
echo "filename: $file"; echo "filename: $file";
echo "count: $count";
for (( i = 0; i < $num_gnb; i++ )) for (( i = 0; i < $num_gnb; i++ ))
do do
...@@ -38,9 +41,14 @@ do ...@@ -38,9 +41,14 @@ do
do do
name=chF_gnb${i}_${j}.raw name=chF_gnb${i}_${j}.raw
echo "Extracting $name" echo "Extracting $name"
./extract -d ../T_messages.txt $file UE_PHY_DL_CHANNEL_ESTIMATE_FREQ chestF_t -f eNB_ID $i -f rsc_id $j -o $name -count 100 ./extract -d ../T_messages.txt $file UE_PHY_DL_CHANNEL_ESTIMATE_FREQ chestF_t -f eNB_ID $i -f rsc_id $j -o $name -count $count
name=chT_gnb${i}_${j}.raw name=chT_gnb${i}_${j}.raw
echo "Extracting $name" echo "Extracting $name"
./extract -d ../T_messages.txt $file UE_PHY_DL_CHANNEL_ESTIMATE chest_t -f eNB_ID $i -f rsc_id $j -o $name -count 100 ./extract -d ../T_messages.txt $file UE_PHY_DL_CHANNEL_ESTIMATE chest_t -f eNB_ID $i -f rsc_id $j -o $name -count $count
done done
done done
# zip the extracted dumps
name=prs_dumps.tgz
tar cvzf $name chF_gnb* chT_gnb*
echo "created a zip file $name"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment