Завершено

Bash script to automate performance benchmarks

Need a bash/Linux guru to write a script to automate execution of some performance benchmarks. This script will iterate through and execute about a dozen different benchmark programs individually. The output of the benchmarks will be piped into a processing script or flat file. Some benchmarks need to be executed in the background with nohup and the script should be capable of polling those background benchmarks until completion.

## Deliverables

Here is exactly what the script need to do:

1. When it starts, prompt for 3 values: Hostname, Server ID, and Test ID

2. Hostname should be set in /etc/sysconfig/network and using `hostname`

3. Server ID and Test ID should be set in environment variables in /etc/profile (CH_SERVER_ID,? CH_TEST_ID) which should then be sourced to take immediate effect

4. Script should then check that at least [url removed, login to view] free space is available on disk in the partition where /home resides. If [url removed, login to view] is not available, exit and output "Insufficient free space available in /home partition"

4. Script should then execute `[url removed, login to view] -v` and look for a success message. If success message is not presented, exit and output "Benchmarking cannot proceed because database is not accessible"

Bonnie++ Benchmark

1. chmod go+w /dev/null

2. su - cloudharmony

3. (as cloudharmony user) /usr/sbin/bonnie++ -n 512 -m $CH_SERVER_ID -fq (capture output to /tmp/[url removed, login to view])

4. exit out of cloudharmony user (back to root) and execute: [url removed, login to view] /tmp/[url removed, login to view]

Geekbench Benchmark:

1. If 64-bit:? geekbench-64bit -s | [url removed, login to view]

2. If 32-bit:? geekbench -s | [url removed, login to view]

hdparm Benchmark:

1. Determine which device handles the primary / partition (i.e. /dev/hda1)

2.? hdparm -t /dev/[device from #1] | [url removed, login to view]; hdparm -T /dev/[device from #1] | [url removed, login to view]

mysql-bench Benchmark:

1.? service mysql start

2.? rm -rf? /var/lib/mysql/test

3. mkdir? rm -rf? /var/lib/mysql/test

4. chown mysql:mysql? /var/lib/mysql/test

5. cd /usr/share/sql-bench/

6. perl run-all-tests | [url removed, login to view]

tpcc-mysql Benchmark:

1.? cd /usr/local/tpcc-mysql

2.? rm -rf? /var/lib/mysql/tpcc

3. mkdir? rm -rf? /var/lib/mysql/tpcc

4. chown mysql:mysql /var/lib/mysql/tpcc

5. mysql tpcc < [url removed, login to view]

6. mysql tpcc < [url removed, login to view]

7. ./tpcc_load localhost tpcc root '' 10

8.? ./tpcc_start localhost tpcc root '' 10 6 60 180 | [url removed, login to view]

9. service mysql stop

10. rm -rf? /var/lib/mysql/test? /var/lib/mysql/tpcc

phpbench Benchmark:

1.? cd /var/lib/phpbench

2. php [url removed, login to view] | [url removed, login to view]

pybench Benchmark:

1.? cd /var/lib/pybench

2. python [url removed, login to view] | [url removed, login to view]

redis-benchmark Benchmark:

1.? cd /usr/local/redis

2. Launch server in background and capture PID: ./redis-server &

3.? ./redis-benchmark -n 100000 | [url removed, login to view]

4. When #3 completes, kill redis-server process from #2

ruby-benchmark-suite Benchmark:

1.? cd /var/lib/ruby-benchmark-suite

2. rake bench:dir DIR=benchmarks/macro-benchmarks | [url removed, login to view]

loopback-performance Benchmark:

1. Launch background process:? nc -d -l 9999 > /dev/null &

2.? time dd if=/dev/zero bs=1M count=10000 | nc localhost 9999

3. Capture output from #2 into /tmp/[url removed, login to view]

4.? [url removed, login to view] /tmp/[url removed, login to view]

SPECjvm2008 Benchmark:

1.? cd /var/lib/SPECjvm2008

2.? Launch in background:? nohup java -jar [url removed, login to view] --propfile props/[url removed, login to view] > /tmp/[url removed, login to view] &

3.? Upon completion (may take up to 12 hours):? [url removed, login to view] /tmp/[url removed, login to view]

Unixbench Benchmark:

1.? Launch in background: nohup? unixbench > /tmp/[url removed, login to view] &

2.? Upon completion (may take up to 12 hours):? [url removed, login to view] /tmp/[url removed, login to view]

phoronix-test-suite Benchmark:

1.? rm -rf /var/lib/pgsql/data

2. chmod go+w /dev/null

3.? service postgresql start

4. service postgresql stop

5. Launch in background: nohup [url removed, login to view] > /tmp/[url removed, login to view] &

6. Upon completion (may take up to 24 hours):? [url removed, login to view] /tmp/[url removed, login to view]

Cleanup:

1. Remove environment variables? (CH_SERVER_ID,? CH_TEST_ID) from /etc/profile

2.? cd /var/www/sierra/log/

3. rm -f *

4. cd /var/lib/SPECjvm2008/results/

5. rm -rf SPEC*

6. cd /tmp/

7. rm -rf *

8. cd ~/.phoronix-test-suite/test-results/

9. rm -rf $CH_TEST_ID*

10. cd /var/www/sierra/tmp/

11. rm -f $CH_TEST_ID*

12. Output: Benchmarks completed successfully

Other Requirements:

Script should write to /tmp/benchmark-status to track what step it is currently on in the benchmark process and the time that step was started (i.e. 4/25/2010 18:25:35,phoronix-test-suite

Output of the entire benchmark process should also be written to /tmp/benchmark-output

Upon completion of all benchmarks, write "completion" to? /tmp/benchmark-status

Script should also output the current benchmark status to stdout

If script gets terminated while? SPECjvm2008,? Unixbench or? phoronix-test-suite benchmarks are executing in the background, and the script is re-started, and those benchmarks are still executing in the background, it should resume where it left off (probably need to keep track of the PID for those background processes and use that in conjunction with? /tmp/benchmark-status to determine whether to resume or start over when the script is started)

Note:

A development environment will be provided in EC2

Квалификация: Техника, Linux, MySQL, PHP, Архитектура ПО, Тестирование ПО

Показать больше phoronix nohup, redis mysql benchmark environment script, linux script automate performance check, w.s. development, where is guru, what to write on a resume, what to look for in a ruby, test script development, test guru, status guru, sql server resume, service bench, script resume, resume guru, python look for file, python guru, php script null, nc time, java bit set, guru to

О работодателе:
( 2 отзыв(-а, -ов) ) United States

ID проекта: #3375223

Поручен:

YoctoPetaBorg

See private message.

$127.49 USD за 21 дней(-я)
(26 отзывов(-а))
4.8

4 фрилансеров(-а) в среднем готовы выполнить эту работу за $312

stevenfvw

See private message.

$170 USD за 21 дней(-я)
(13 отзывов(-а))
3.4
pujagiri

See private message.

$102 USD за 21 дней(-я)
(0 отзывов(-а))
0.0
bluesoftcoders

See private message.

$850 USD за 21 дней(-я)
(3 отзывов(-а))
2.2