-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbonner.sh
More file actions
29 lines (21 loc) · 707 Bytes
/
Copy pathbonner.sh
File metadata and controls
29 lines (21 loc) · 707 Bytes
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
#!/bin/bash
# Author Dario Clavijo 2016
# GPLv3
set -x
function bonne {
DEVICE=$1
SIZE="1G:4k"
KFILES=2
TESTS=10
USER=root
DIR=/media/$DEVICE
DEVNAME=$(multipath -l | grep -e $DEVICE | awk '{ print $3 }' | sed -e "s/,/_/g")
date=$(date +"%H%M%S-%d%m%Y")
HTML_OUTPUT_FILE=/var/www/html/bonnie/bonnie_"$SIZE"_"$HOSTNAME"_"$DEVICE"_"$DEVNAME"_$date.html
OPTS="-f -b -r 0 -q"
/usr/sbin/bonnie -d $DIR -s $SIZE -n $KFILES -m $HOSTNAME -u $USER -x $TESTS $OPTS > /tmp/bonnie.csv
cat /tmp/bonnie.csv | bon_csv2html > $HTML_OUTPUT_FILE
}
# example only, edit below lines with real wwns
bonne 360060000000000000000000000000000-part1 # lun 0
bonne 360060000000000000000000000000001-part1 # lun 1