openbsd-ports/benchmarks/sysbench/patches/patch-scripts_sb_run_sh
sthen 8455372320 import sysbench:
SysBench is a modular, cross-platform and multi-threaded benchmark tool
for evaluating OS parameters that are important for a system running a
database under intensive load.

The idea of this benchmark suite is to quickly get an impression about
system performance without setting up complex database benchmarks or
even without installing a database at all.

Current features allow to test the following system parameters:

    * file I/O performance
    * scheduler performance
    * memory allocation and transfer speed
    * POSIX threads implementation performance
    * database server performance (OLTP benchmark)

Primarily written for MySQL server benchmarking, SysBench will be
further extended to support multiple database backends, distributed
benchmarks and third-party plug-in modules.

from Jung (maintainer) with some tweaks.
thanks to landry@ for testing and feedback.

ok landry
2008-04-15 14:14:08 +00:00

45 lines
1.4 KiB
Plaintext

$OpenBSD: patch-scripts_sb_run_sh,v 1.1.1.1 2008/04/15 14:14:08 sthen Exp $
--- scripts/sb_run.sh.orig Tue Jan 31 11:15:49 2006
+++ scripts/sb_run.sh Tue Apr 15 12:52:29 2008
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# File: sb_run.sh
#
# Copyright (C) 2004 Alexey Kopytov & MySQL AB
@@ -7,10 +7,10 @@ sbname=sysbench
#Install signals handlers
trap 'echo "Got SIGINT, exiting..."; \
- killall vmstat; killall iostat; killall mpstat' INT
+ pkill vmstat; pkill iostat' INT
trap 'echo "Got SIGTERM, exiting..."; \
- killall vmstat; killall iostat; killall mpstat' TERM
+ pkill vmstat; pkill iostat' TERM
# First try to find SysBench in the current dir
@@ -83,13 +83,13 @@ RUN_NUMBER=`expr $RUN_NUMBER + 1`
echo $RUN_NUMBER > .run_number
# Start vmstat
-nohup vmstat -n $UPDATES_INTERVAL >$OUTPUT_DIR/vmstat.out 2>&1 &
+nohup vmstat $UPDATES_INTERVAL >$OUTPUT_DIR/vmstat.out 2>&1 &
# Start iostat
nohup iostat $UPDATES_INTERVAL >$OUTPUT_DIR/iostat.out 2>&1 &
# Start mpstat
-nohup mpstat $UPDATES_INTERVAL >$OUTPUT_DIR/mpstat.out 2>&1 &
+# nohup mpstat $UPDATES_INTERVAL >$OUTPUT_DIR/mpstat.out 2>&1 &
cat >$OUTPUT_DIR/desc.txt <<EOF
$sbname command line args: $sbpath $sbargs
@@ -101,4 +101,4 @@ echo "Running $sbpath $sbargs"
$sbpath $sbargs >$OUTPUT_DIR/sysbench.out 2>&1
-killall vmstat; killall iostat; killall mpstat
+pkill vmstat; pkill iostat