2 # Copyright (c) 2018 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:
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 echo "[Command_start_exec] '$1'"
17 echo -n "[Command_outputs] "
19 echo "[Command_done_exec] '$1'"
24 echo "[Command_desc] Starting ${0}"
26 if [ -f "/etc/redhat-release" ]; then
29 cmd 'dpkg -l | grep vpp'
32 cmd 'ps aux | grep vpp'
34 cmd 'cat /etc/vpp/startup.conf'
36 cmd 'if fgrep docker /proc/1/cgroup; then supervisorctl restart vpp; else sudo -S service vpp restart; fi'
38 echo "[Command_desc] SLEEP for three seconds, so that VPP is up for sure"
41 cmd "sudo journalctl --no-pager --unit=vpp --since=\"$(echo `systemctl show -p ActiveEnterTimestamp vpp` | awk '{print $2 $3}')\""
43 cmd 'cat /proc/meminfo'
47 cmd 'ps aux | grep vpp'
49 cmd 'sudo dmidecode | grep UUID'
53 echo "[Command_desc] Adding dpdk-input trace"
54 cmd 'sudo vpp_api_test <<< "exec trace add dpdk-input 50"'
56 echo "[Command_desc] Adding vhost-user-input trace"
57 cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 50"'
59 echo "[Command_desc] Adding memif-input trace"
60 cmd 'sudo vpp_api_test <<< "exec trace add memif-input 50"'