Update VPP version downloaded from Nexus.
[csit.git] / resources / libraries / bash / dut_setup.sh
1 #!/bin/bash
2 # Copyright (c) 2016 Cisco and/or its affiliates.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 echo
16 echo List vpp packages
17 echo
18 dpkg -l vpp\*
19
20 echo
21 echo See vpp process
22 echo
23 ps aux | grep vpp
24
25 echo
26 echo See /etc/vpp/startup.conf
27 echo
28 cat /etc/vpp/startup.conf
29
30 echo
31 echo Restart VPP
32 echo
33 sudo -S service vpp restart
34
35 echo
36 echo List /proc/meminfo
37 echo
38 cat /proc/meminfo
39
40 echo
41 echo See free memory
42 echo
43 free -m
44
45 echo
46 echo See vpp process
47 echo
48 ps aux | grep vpp
49
50 echo UUID
51 sudo dmidecode | grep UUID
52
53 echo Add dpdk-input trace
54 sudo vpp_api_test <<< "exec trace add dpdk-input 100"
55 RESULT=$?
56 if [ $RESULT -ne 0 ]; then
57   echo
58   echo See /var/log/syslog
59   sudo tail -n 200 /var/log/syslog
60   exit $RESULT
61 fi