Commit e46ed53f authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5246 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent fb3297bc
......@@ -93,7 +93,7 @@
###########################################################
# Parameters
###########################################################
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1 ASN_DEBUG=1 EMIT_ASN_DEBUG=1"
declare MAKE_IP_DRIVER_TARGET="ue_ip.ko"
declare IP_DRIVER_NAME="ue_ip"
declare LTEIF="oip1"
......@@ -119,12 +119,13 @@ else
fi
test_command_install_package "tshark" "tshark" "--force-yes"
test_command_install_package "gccxml" "gccxml" "--force-yes"
test_command_install_package "vconfig" "vlan"
test_command_install_package "iptables" "iptables"
test_command_install_package "iperf" "iperf"
test_command_install_package "ip" "iproute"
test_command_install_script "ovs-vsctl" "$OPENAIRCN_DIR/SCRIPTS/install_openvswitch1.9.0.bash"
#test_command_install_script "ovs-vsctl" "$OPENAIRCN_DIR/SCRIPTS/install_openvswitch1.9.0.bash"
test_command_install_package "tunctl" "uml-utilities"
#test_command_install_lib "/usr/lib/libconfig.so" "libconfig-dev"
......@@ -251,7 +252,7 @@ bash_exec "insmod $OPENAIR2_DIR/NETWORK_DRIVER/UE_IP/$IP_DRIVER_NAME.ko"
bash_exec "ip route flush cache"
bash_exec "ip link set $LTEIF up"
#bash_exec "ip link set $LTEIF up"
sleep 1
#bash_exec "ip addr add dev $LTEIF $UE_IPv4_CIDR"
#bash_exec "ip addr add dev $LTEIF $UE_IPv6_CIDR"
......@@ -279,11 +280,22 @@ ip route add default dev $LTEIF table lte
ITTI_LOG_FILE=./itti_enb.$HOSTNAME.log
rotate_log_file $ITTI_LOG_FILE
STDOUT_LOG_FILE=./stdout_enb_ue.log
rotate_log_file $STDOUT_LOG_FILE
rotate_log_file $STDOUT_LOG_FILE.filtered
rotate_log_file tshark.pcap
cd $THIS_SCRIPT_PATH
nohup tshark -i $ENB_INTERFACE_NAME_FOR_S1_MME -i $ENB_INTERFACE_NAME_FOR_S1U -w tshark.pcap &
nohup xterm -e $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/UserProcess &
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -u1 -l9 -K $ITTI_LOG_FILE --enb-conf $CONFIG_FILE_ENB 2>&1 | tee $STDOUT_LOG_FILE
pkill tshark
cat $STDOUT_LOG_FILE | grep -v '[PHY]' | grep -v '[MAC]' | grep -v '[EMU]' | \
grep -v '[OCM]' | grep -v '[OMG]' | \
grep -v 'RLC not configured' | grep -v 'check if serving becomes' | \
grep -v 'mac_rrc_data_req' | grep -v 'BCCH request =>' > $STDOUT_LOG_FILE.filtered
......@@ -112,6 +112,7 @@ else
fi
test_command_install_package "tshark" "tshark" "--force-yes"
test_command_install_package "gccxml" "gccxml" "--force-yes"
test_command_install_package "gcc" "gcc" "--force-yes"
test_command_install_package "g++" "g++" "--force-yes"
......
......@@ -202,13 +202,23 @@ extract() {
}
rotate_log_file () {
if [ -f $1 ]; then
FULLPATH=$1
if [ -f $FULLPATH ]; then
FILENAME=${FULLPATH##*/}
FILEEXTENSION=${FILENAME##*.}
BASEDIRECTORY=${FULLPATH%$FILENAME}
if [ "a$BASEDIRECTORY" == "a" ]; then
BASEDIRECTORY='.'
fi
FILENAME_NO_EXT=$(echo "$FILENAME" | sed 's/\.[^\.]*$//')
TIMESTAMP=`date +%Y-%m-%d.%Hh_%Mm_%Ss`
NEWLOGFILE=$1.$TIMESTAMP
mv $1 $NEWLOGFILE
cat /dev/null > $1
NEWLOGFILE=$TIMESTAMP.$FILENAME_NO_EXT.$FILEEXTENSION
mv $FULLPATH /tmp/$NEWLOGFILE
cat /dev/null > $FULLPATH
sync
nohup gzip -f -9 $NEWLOGFILE &
gzip -c --name -f -9 /tmp/$NEWLOGFILE > $BASEDIRECTORY/$NEWLOGFILE.gz &
fi
}
......
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