3 ##############################################################################
4 ## Copyright (c) 2015 Intel Corp.
6 ## All rights reserved. This program and the accompanying materials
7 ## are made available under the terms of the Apache License, Version 2.0
8 ## which accompanies this distribution, and is available at
9 ## http://www.apache.org/licenses/LICENSE-2.0
10 ###############################################################################
12 # Number of huge pages to create and on which NUMA node
16 # QEMU executable path and number of cpus for guest
17 qemu=/usr/local/bin/qemu-system-x86_64
19 pcm_memory=/root/pcm/pcm-memory.x
21 # Isolated cpus for nfv, must be given as a range '-' and Numa node1 CPU's should be considered
22 host_isolcpus=`lscpu | grep "NUMA node1 CPU(s)"| awk -F ':' '{print \$2}' | sed 's/[[:space:]]//g'`
23 first=$(echo ${host_isolcpus} | cut -f1 -d-)
24 last=$(echo ${host_isolcpus} | cut -f2 -d-)
26 # Bind cpus from host_isolcpus range for QEMU processor threads
28 while [ ${i} -lt ${guest_cpus} ]; do
31 first=`expr $first + 1`
34 #Isolated cpus from host_isolcpus range to run Stress tool
35 stress_isolcpus=${first}-${last}
36 echo "Stress tool runs on $stress_isolcpus"
38 #Tar the log files generated during testcase execution.
41 cd $WORKSPACE/build_output/
43 tar -czvf log-$(date -u +"%Y-%m-%d_%H-%M-%S").tar.gz log
49 echo "Copying Log files from Node to Jump Server"
50 sudo ssh root@${HOST_IP} "cd /root;tar -czvf MBWInfo.tar.gz MBWInfo"
51 mkdir -p $WORKSPACE/build_output/log/MBWInfo
52 scp root@${HOST_IP}:/root/MBWInfo.tar.gz $WORKSPACE/build_output/log/MBWInfo
53 echo "Listing all the logs collected"
54 cd $WORKSPACE;ls build_output/log/MBWInfo;
55 sudo ssh root@${HOST_IP} "cd /root;rm -rf MBWInfo MBWInfo.tar.gz"