-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlinux-bench-storage.sh
More file actions
94 lines (77 loc) · 2.1 KB
/
linux-bench-storage.sh
File metadata and controls
94 lines (77 loc) · 2.1 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
#
# Linux-Bench Storage Benchmark Script
# (C) 2013-2014 ServeTheHome.com and ServeThe.biz
#
# Linux-Bench - A System benchmark and comparison tool created by the STH community.
#
# Linux-Bench is a sscript that runs fio
#
# Linux-Bench must be run as root or using a su prompt to automate download and installation of benchmarks
#
# For more information go:
# http://www.linux-bench.com
#
# Authors: Patrick Kennedy, Patriot
#
# Latest development versions are available on the GitHub site: https://github.com/STH-Dev/linux-bench-storage/
#
# If you find bugs, verify you are on the latest version and then post in:
# https://forums.servethehome.com/index.php?threads/linux-bench-storage.3916/
#
################################################################################################################################
#Current Version
rev='s0001'
version()
{
cat << EOF
##############################################################
# (c) 2014 ServeTheHome.com and ServeThe.biz
#
# Linux-Bench $rev
# - Linux-Bench Storage the STH Storage Benchmark Suite
###############################################################
EOF
}
usage()
{
cat << EOF
usage: $0
This is the STH benchmark suite.
ARGS:
ARG1 - none required for now
ARG2 - none required for now
ARG3 - none required for now
OPTIONAL ARGS:
ARG -- script_option_1 script_option-2
OPTIONS:
-h help (usage info)
-V Version of Linux-Bench Storage
ENVIRONMENT VARIABLES:
VIRTUAL = If unset, value is FALSE. Set to TRUE if running virtualized (automatically set for Docker)
EOF
}
# Verify if the script is executed with Root Privileges #
rootcheck()
{
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
echo "Ex. "sudo ./linux-bench.sh""
exit 1
fi
}
#Set Functions
setup()
{
benchdir=`pwd`
NEED_PTS=1
date_str="+%Y_%m%d_%H%M%S"
full_date=`date $date_str`
host=$(hostname)
log="linux-bench-storage"$rev"_"$host"_"$full_date.log
if [ -f /.dockerinit ] ; then
log=/data/"linux-bench-storage"$rev"_"$host"_"$full_date.log
fi
#outdir=$host"_"$full_date
#mkdir $outdir
}