aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNauman_Ahad <Nauman_Ahad@dell.com>2015-12-31 17:22:03 +0500
committerNauman_Ahad <Nauman_Ahad@dell.com>2015-12-31 17:22:03 +0500
commit6586f3b382d549dd6a406065de2de71112712c6f (patch)
treeb787b244663e292731325710cba2bae0239c069c
parent7d705a294ed7c9fb4931ffd2bc0555dfb35231e1 (diff)
Storage Benchmarks testcases along with result transformation script
JIRA QTIP-63 Testcases revised for the storage suite. Result transformation script for Storage testcases addedx System Information script modified to check for network testcases. Change-Id: I6c2fe641432b7bd45097495051e41bab05b8979c Signed-off-by: Nauman_Ahad <Nauman_Ahad@dell.com>
-rw-r--r--benchmarks/playbooks/fio.yaml5
-rw-r--r--benchmarks/playbooks/info_script/info_collect.py165
-rw-r--r--test_cases/dell_santa_clara/storage/fio_2.yaml51
-rw-r--r--test_cases/dell_santa_clara/storage/fio_baremetal.yaml39
-rw-r--r--test_cases/dell_santa_clara/storage/fio_parallel.yaml43
-rw-r--r--test_cases/dell_santa_clara/storage/fio_vm.yaml44
-rw-r--r--test_list/storage.txt3
7 files changed, 160 insertions, 190 deletions
diff --git a/benchmarks/playbooks/fio.yaml b/benchmarks/playbooks/fio.yaml
index 9f832ce1..b0774fca 100644
--- a/benchmarks/playbooks/fio.yaml
+++ b/benchmarks/playbooks/fio.yaml
@@ -63,11 +63,6 @@
fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/fio/fio_temp
with_items: copy_log_results.stdout_lines
-
- - name: copy results
- fetch: src=/root/results/{{item}} dest=../../{{Dest_dir}}/fio
- with_items: files_to_copy.stdout_lines
-
- hosts: 127.0.0.1
connection: local
tasks:
diff --git a/benchmarks/playbooks/info_script/info_collect.py b/benchmarks/playbooks/info_script/info_collect.py
index e286d683..b352651e 100644
--- a/benchmarks/playbooks/info_script/info_collect.py
+++ b/benchmarks/playbooks/info_script/info_collect.py
@@ -5,105 +5,90 @@ import datetime
import json
import sys
-
os.system('inxi -b -c0 -n > $PWD/est_2')
-est_ob = open("est_2", "r+")
-est_ob2 = open("est_1", "w+")
-in_string = est_ob.read().replace('\n', ' ')
-
-est_ob2.write(in_string)
+est_ob=open("est_2","r+")
+est_ob2=open("est_1","w+")
+in_string= est_ob.read().replace('\n',' ')
+cpu_idle=float(os.popen("""top -bn1 | grep "Cpu(s)" | awk '{print $8}'""").read().rstrip())
+cpu_usage= 100-cpu_idle
+est_ob2.write(in_string);
est_ob.close()
est_ob2.close()
-Info_dict = {}
-inxi_host = os.popen(
- """cat $PWD/est_1 | grep -o -P '(?<=Host:).*(?=Kernel)' """).read().lstrip().rstrip()
-inxi_mem = os.popen(
- """inxi -c0 | grep -o -P '(?<=Mem~).*(?=HDD)' """).read().lstrip().rstrip()
-inxi_cpu = os.popen(
- """cat $PWD/est_1 | grep -o -P '(?<=CPU).*(?=speed)' | cut -f2 -d':'""").read().lstrip().rstrip()
-#inxi_Speed=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=max:).*(?=Graphics)' """).read().rstrip().lstrip()
-inxi_distro = os.popen(
- """ cat $PWD/est_1 | grep -o -P '(?<=Distro:).*(?=Machine:)' """).read().rstrip().lstrip()
-inxi_kernel = os.popen(
- """ cat $PWD/est_1 | grep -o -P '(?<=Kernel:).*(?=Console:)' """).read().rstrip().lstrip()
-inxi_HD = os.popen(
- """ cat $PWD/est_1 | grep -o -P '(?<=HDD Total Size:).*(?=Info:)' """).read().rstrip().lstrip()
-#inxi_system=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Machine System:).*(?=product:)' """).read().rstrip().lstrip()
-inxi_product = os.popen(
- """ cat $PWD/est_1 | grep -o -P '(?<=product:).*(?=Mobo:)' """).read().rstrip().lstrip()
-# print inxi_system
+Info_dict={};
+inxi_host=os.popen("""cat $PWD/est_1 | grep -o -P '(?<=Host:).*(?=Kernel)' """).read().lstrip().rstrip()
+inxi_mem=os.popen("""cat $PWD/est_1 | grep -o -P '(?<=Memory:).*(?=Init)' """).read().lstrip().rstrip()
+inxi_cpu=os.popen("""cat $PWD/est_1 | grep -o -P '(?<=CPU).*(?=speed)' | cut -f2 -d':'""").read().lstrip().rstrip()
+inxi_distro=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Distro:).*(?=Machine:)' """).read().rstrip().lstrip()
+inxi_kernel=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Kernel:).*(?=Console:)' """).read().rstrip().lstrip()
+inxi_HD=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=HDD Total Size:).*(?=Info:)' """).read().rstrip().lstrip()
+inxi_product=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=product:).*(?=Mobo:)' """).read().rstrip().lstrip()
+
+
+Info_dict['1_Hostname']=inxi_host
+Info_dict['2_Product']=inxi_product
+Info_dict['3_OS Distribution']=inxi_distro
+Info_dict['4_Kernel']=inxi_kernel
+Info_dict['5_CPU']=inxi_cpu
+Info_dict['6_CPU_Usage']=str(round(cpu_usage,3))+'%'
+Info_dict['7_Memory Usage']=inxi_mem
+Info_dict['8_Disk usage']=inxi_HD
+network_flag=str(sys.argv[1]).rstrip()
-Info_dict['1_Hostname'] = inxi_host
-Info_dict['2_Product'] = inxi_product
-Info_dict['3_OS Distribution'] = inxi_distro
-Info_dict['4_Kernel'] = inxi_kernel
-Info_dict['5_CPU'] = inxi_cpu
-Info_dict['6_Memory Usage'] = inxi_mem
-Info_dict['7_Disk usage'] = inxi_HD
-Info_dict['8_Network_Interfaces'] = {}
+if (network_flag == 'n'):
+
+ Info_dict['9_Network_Interfaces']={};
+ tem_2=""" cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'"""
+ print os.system(tem_2+' > Hello')
+ i=int(os.popen(tem_2+" | grep -o 'Card' | wc -l ").read())
+ print i
-tem_2 = """ cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'"""
-print os.system(tem_2 + ' > Hello')
-i = int(os.popen(tem_2 + " | grep -o 'Card' | wc -l ").read())
-print i
+ for x in range (1,i+1):
+ tem=""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Card-"""+str(x+1)+""")'"""
+ if i == 1:
+ tem=""" cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'"""
+ inxi_card_1=((os.popen(tem+" | grep -o -P '(?<=Card:).*(?=Drives:)'|sed 's/ *driver:.*//'").read().rstrip().lstrip()))
+ print inxi_card_1
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]={};
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['1_Network_Card']=inxi_card_1
+ inxi_card_2=((os.popen(tem+"| grep -o -P '(?<=Card:).*(?=Drives:)'|sed -e 's/^.*IF: //'").read())).rstrip().lstrip()
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['2_Interface_info']=inxi_card_2
+ elif x < (i):
+ print "two"
+ #inxi_Card_temp=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Card-"""+str(x+1)+""")' """).read().rstrip().lstrip()))
+ inxi_card_1=((os.popen(tem+"| sed 's/ *driver:.*//'").read().rstrip().lstrip()))
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]={};
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['1_Network_Card']=inxi_card_1
+ inxi_card_2=((os.popen(tem+"|sed -e 's/^.*IF: //'").read())).rstrip().lstrip()
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['2_Interface_info']=inxi_card_2
+ elif x == i:
+ print "Three"
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]={};
+ inxi_card_1=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Drives:)'| sed 's/ *driver:.*//' """).read().rstrip().lstrip()))
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['1_Network_Card']=inxi_card_1
+ inxi_card_2=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Drives:)'| sed -e 's/^.*IF: //' """).read().rstrip().lstrip()))
+ Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['2_Interface_info']=inxi_card_2
+ else:
+ print "No network cards"
+ os.system("bwm-ng -c 1 | grep -v '=' | grep -v 'iface' | grep -v '-' > bwm_dump")
+ n_interface=int(os.popen(" cat bwm_dump | grep -v 'total' | wc -l ").read().rstrip())
+ interface={};
+ for x in range (1,n_interface):
+ interface_name=os.popen(" cat bwm_dump | awk 'NR=="+str(x)+"' | awk '{print $1}' ").read().rstrip().replace(':','')
+ interface[str(interface_name)]={};
+ interface[str(interface_name)]['Rx (KB/s)']=os.popen(" cat bwm_dump | awk 'NR=="+str(x)+"' | awk '{print $2}' ").read().rstrip()
+ interface[str(interface_name)]['Tx (KB/s)']=os.popen(" cat bwm_dump | awk 'NR=="+str(x)+"' | awk '{print $4}' ").read().rstrip()
+ interface[str(interface_name)]['Total (KB/s)']=os.popen(" cat bwm_dump | awk 'NR== "+str(x)+"' | awk '{print $6}' ").read().rstrip()
+
+ Info_dict['Interface I/O']=interface
-for x in range(1, i + 1):
- tem = """ cat $PWD/est_1 | grep -o -P '(?<=Card-""" + str(
- x) + """:).*(?=Card-""" + str(x + 1) + """)'"""
- if i == 1:
- tem = """ cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'"""
- inxi_card_1 = (
- (os.popen(
- tem +
- " | grep -o -P '(?<=Card:).*(?=Drives:)'|sed 's/ *driver:.*//'").read().rstrip().lstrip()))
- print inxi_card_1
- Info_dict['8_Network_Interfaces']['Interface_' + str(x)] = {}
- Info_dict['8_Network_Interfaces'][
- 'Interface_' + str(x)]['1_Network_Card'] = inxi_card_1
- inxi_card_2 = (
- (os.popen(
- tem +
- "| grep -o -P '(?<=Card:).*(?=Drives:)'|sed -e 's/^.*IF: //'").read())).rstrip().lstrip()
- Info_dict['8_Network_Interfaces'][
- 'Interface_' + str(x)]['2_Interface_info'] = inxi_card_2
- elif x < (i):
- print "two"
- #inxi_Card_temp=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Card-"""+str(x+1)+""")' """).read().rstrip().lstrip()))
- inxi_card_1 = (
- (os.popen(tem + "| sed 's/ *driver:.*//'").read().rstrip().lstrip()))
- Info_dict['8_Network_Interfaces']['Interface_' + str(x)] = {}
- Info_dict['8_Network_Interfaces'][
- 'Interface_' + str(x)]['1_Network_Card'] = inxi_card_1
- inxi_card_2 = (
- (os.popen(tem + "|sed -e 's/^.*IF: //'").read())).rstrip().lstrip()
- Info_dict['8_Network_Interfaces'][
- 'Interface_' + str(x)]['2_Interface_info'] = inxi_card_2
- elif x == i:
- print "Three"
- Info_dict['8_Network_Interfaces']['Interface_' + str(x)] = {}
- inxi_card_1 = (
- (os.popen(
- """ cat $PWD/est_1 | grep -o -P '(?<=Card-""" +
- str(x) +
- """:).*(?=Drives:)'| sed 's/ *driver:.*//' """).read().rstrip().lstrip()))
- Info_dict['8_Network_Interfaces'][
- 'Interface_' + str(x)]['1_Network_Card'] = inxi_card_1
- inxi_card_2 = (
- (os.popen(
- """ cat $PWD/est_1 | grep -o -P '(?<=Card-""" +
- str(x) +
- """:).*(?=Drives:)'| sed -e 's/^.*IF: //' """).read().rstrip().lstrip()))
- Info_dict['8_Network_Interfaces'][
- 'Interface_' + str(x)]['2_Interface_info'] = inxi_card_2
- else:
- print "No network cards"
print Info_dict
-home_dir = str(os.popen("echo $HOME").read().rstrip())
-with open('./sys_info_temp', 'w+')as out_info:
- pickle.dump(Info_dict, out_info)
+
+with open('./sys_info_temp','w+')as out_info:
+ pickle.dump(Info_dict,out_info)
-# json.dump(Info_dict, out_json, sort_keys=True,separators=(',',':'),indent=4)
+with open('temp','w+') as result_json:
+ json.dump(Info_dict,result_json,indent=4,sort_keys=True)
diff --git a/test_cases/dell_santa_clara/storage/fio_2.yaml b/test_cases/dell_santa_clara/storage/fio_2.yaml
deleted file mode 100644
index 46368cd2..00000000
--- a/test_cases/dell_santa_clara/storage/fio_2.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-Scenario:
- benchmark: fio
- host: machine_1, machine_2
- server: blakc
-
-Context:
- Host_Machines:
- machine_1:
- ip: 10.20.0.4
- pw: r00tme
-
- machine_2:
- ip: 10.20.0.5
- pw: r00tme
- Virtual_Machines:
- # virtualmachine_1:
- # availability_zone: compute1
- # public_network: 'net04_ext'
- #OS_image: QTIP_CentOS
- #flavor: m1.large
- #role: host
- #virtualmachine_2:
- #availability_zone: compute2
- #public_network: 'net04_ext'
- #OS_image: QTIP_CentOS
- #flavor: m1.large
- role: host
-
-Test_Description:
- Test_category: "Compute"
- Benchmark: "dhrystone"
- Overview: >
- '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n
- if you wish to add a virtual machine add the following information under the Virtual_Machine tag
- machine_1:
- ip: 172.18.0.16
- pw: Op3nStack
- role: host
- machine_2:
- ip: 172.18.0.15
- pw: Op3nStack
- role: host
-
- virtualmachine_1:
- availability_zone:
- public_network:
- OS_image:
- flavor:
- role:
- '''
-
diff --git a/test_cases/dell_santa_clara/storage/fio_baremetal.yaml b/test_cases/dell_santa_clara/storage/fio_baremetal.yaml
new file mode 100644
index 00000000..4778c385
--- /dev/null
+++ b/test_cases/dell_santa_clara/storage/fio_baremetal.yaml
@@ -0,0 +1,39 @@
+Scenario:
+ benchmark: fio
+ host: machine_1, machine_2
+ server: blakc
+
+Context:
+ Host_Machines:
+ machine_1:
+ ip: 10.20.0.7
+ pw: r00tme
+ role: host
+ machine_2:
+ ip: 10.20.0.6
+ pw: r00tme
+ role: host
+
+
+ Virtual_Machines:
+
+
+Test_Description:
+ Test_category: "Storage"
+ Benchmark: "FIO"
+ Overview: >
+ '''This test will run the FIO benchmark in parallel on host machines "machine_1" and "machine_2".\n
+ The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job.
+ The job conists of an fio load of:
+ 1.50% rand read 50% rand write
+ 2.Asynch engine
+ 3.Direct IO.
+ 4.Queing depth of 2
+
+ if you wish to add another machine add the following information under the Host_Machines tag
+ machine_3:
+ ip: 172.18.0.16
+ pw: Op3nStack
+ role: host
+ '''
+
diff --git a/test_cases/dell_santa_clara/storage/fio_parallel.yaml b/test_cases/dell_santa_clara/storage/fio_parallel.yaml
deleted file mode 100644
index 9f11af05..00000000
--- a/test_cases/dell_santa_clara/storage/fio_parallel.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-Scenario:
- benchmark: fio
- host: machine_1, machine_2
- server: blakc
-
-Context:
- Host_Machines:
- machine_1:
- ip: 10.20.0.6
- pw: r00tme
- role: host
- machine_2:
- ip: 10.20.0.7
- pw: r00tme
- role: host
-
-
- Virtual_Machines:
-
-
-Test_Description:
- Test_category: "Compute"
- Benchmark: "dhrystone"
- Overview: >
- '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n
- if you wish to add a virtual machine add the following information under the Virtual_Machine tag
- machine_1:
- ip: 172.18.0.16
- pw: Op3nStack
- role: host
- machine_2:
- ip: 172.18.0.15
- pw: Op3nStack
- role: host
-
- virtualmachine_1:
- availability_zone:
- public_network:
- OS_image:
- flavor:
- role:
- '''
-
diff --git a/test_cases/dell_santa_clara/storage/fio_vm.yaml b/test_cases/dell_santa_clara/storage/fio_vm.yaml
new file mode 100644
index 00000000..dcd27252
--- /dev/null
+++ b/test_cases/dell_santa_clara/storage/fio_vm.yaml
@@ -0,0 +1,44 @@
+Scenario:
+ benchmark: fio
+ host: machine_1, machine_2
+ server: blakc
+
+Context:
+ Host_Machines:
+
+ Virtual_Machines:
+ virtualmachine_1:
+ availability_zone: compute1
+ public_network: 'net04_ext'
+ OS_image: QTIP_CentOS
+ flavor: m1.large
+ role: host
+ virtualmachine_2:
+ availability_zone: compute2
+ public_network: 'net04_ext'
+ OS_image: QTIP_CentOS
+ flavor: m1.large
+ role: host
+
+Test_Description:
+ Test_category: "Storage"
+ Benchmark: "FIO"
+ Overview: >
+ '''This test will run the FIO benchmark in parallel on virtualmachine_1 and virtualmachine_2.\n
+ The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job.
+ The job conists of an fio load of:
+ 1.50% rand read 50% rand write
+ 2.Asynch engine
+ 3.Direct IO.
+ 4.Queing depth of 2
+
+ if you wish to add a virtual machine add the following information under the Virtual_Machine tag
+
+ virtualmachine_3:
+ availability_zone:
+ public_network:
+ OS_image:
+ flavor:
+ role:
+ '''
+
diff --git a/test_list/storage.txt b/test_list/storage.txt
index 7884a434..fdca37e5 100644
--- a/test_list/storage.txt
+++ b/test_list/storage.txt
@@ -1 +1,2 @@
-fio_parallel.yaml
+fio_baremetal.yaml
+fio_vm.yaml