-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpbench-test.sh
executable file
·49 lines (37 loc) · 1.38 KB
/
pbench-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Script to run openshift-test as a pbench user benchmark.
# This test assumes pbench is installed.
# After the data is collected it can be pushed to server using pbench-move-results
if [ "$EUID" -ne 0 ] ; then
echo Script must be run under root.
exit
fi
set -euxo pipefail
if ! rpm -q pbench-agent ; then
if [ ! -f /etc/yum.repos.d/pbench.repo ] ; then
curl -s https://copr.fedorainfracloud.org/coprs/ndokos/pbench/repo/epel-7/ndokos-pbench-epel-7.repo > /etc/yum.repos.d/pbench.repo
fi
yum -y install pbench-agent
fi
if [ ! -d /var/lib/pbench-agent/tools-default ] ; then
mkdir -p /var/lib/pbench-agent/tools-default
fi
. /opt/pbench-agent/profile
# this is only registering perf
# /opt/pbench-agent/util-scripts/pbench-register-tool-set
for tool in sar iostat mpstat pidstat proc-vmstat proc-interrupts perf ; do
/opt/pbench-agent/util-scripts/pbench-register-tool --name $tool
done
export USE_FLUENTD=${USE_FLUENTD:-true}
export NMESSAGES=${NMESSAGES:-100000}
export NPROJECTS=${NPROJECTS:-1}
#export SKIP_MESSAGES_TEST=${SKIP_MESSAGES_TEST:-true}
COLLECTOR_TYPE=rsyslog
if [ "$USE_FLUENTD" = "true" ] ; then
COLLECTOR_TYPE=fluentd
fi
testname=test-${COLLECTOR_TYPE}-${NMESSAGES}-${NPROJECTS}
nohup pbench-user-benchmark --conf=$testname ./openshift-test.sh > $testname.log 2>&1 &
# pbench-kill-tools
# pbench-stop-tools
# pbench-move-results