Front Haul Interface Library first seed code contribution
[o-du/phy.git] / fhi_lib / app / run_ru.sh
1 #! /bin/bash
2
3 #/******************************************************************************
4 #*
5 #*   Copyright (c) 2019 Intel.
6 #*
7 #*   Licensed under the Apache License, Version 2.0 (the "License");
8 #*   you may not use this file except in compliance with the License.
9 #*   You may obtain a copy of the License at
10 #*
11 #*       http://www.apache.org/licenses/LICENSE-2.0
12 #*
13 #*   Unless required by applicable law or agreed to in writing, software
14 #*   distributed under the License is distributed on an "AS IS" BASIS,
15 #*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 #*   See the License for the specific language governing permissions and
17 #*   limitations under the License.
18 #*
19 #*******************************************************************************/
20
21 ulimit -c unlimited
22 echo 1 > /proc/sys/kernel/core_uses_pid
23
24 grep Huge /proc/meminfo
25 huge_folder="/mnt/huge_ru"
26 [ -d "$huge_folder" ] || mkdir -p $huge_folder
27 if ! mount | grep $huge_folder; then
28  mount none $huge_folder -t hugetlbfs -o rw,mode=0777
29 fi
30
31 ./ru/bin/sample-ru config_file_ru.dat 0000:18:02.0 0000:18:02.1
32
33 umount $huge_folder
34 rmdir $huge_folder
35