Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions sb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ echo "Checking for required dependencies"
function requires() {
if [ `$1 >/dev/null; echo $?` -ne 0 ]; then
TO_INSTALL="$TO_INSTALL $2"
fi
fi
}
function requires_command() {
requires "which $1" $1
function requires_command() {
requires "which $1" $1
}

TO_INSTALL=""
Expand Down Expand Up @@ -87,7 +87,7 @@ if [ "$TO_INSTALL" != '' ]; then
if [ "$UPDATE" != '' ]; then
echo "Doing package update"
$SUDO $UPDATE
fi
fi
$SUDO $PACKAGE_MANAGER install -y $TO_INSTALL $MANAGER_OPTS
fi

Expand Down Expand Up @@ -178,9 +178,9 @@ echo "Distro:
\`cat /etc/issue 2>&1\`
CPU Info:
\`cat /proc/cpuinfo 2>&1\`
Disk space:
Disk space:
\`df --total 2>&1\`
Free:
Free:
\`free 2>&1\`" >> sb-output.log

echo "Running dd I/O benchmark..."
Expand Down Expand Up @@ -253,6 +253,9 @@ cd $UNIX_BENCH_DIR
./Run -c 1 -c `grep -c processor /proc/cpuinfo` >> ../sb-output.log 2>&1
cd ..

echo -e "\\n\\n" >> sb-output.log
( [ -f /proc/net/if_inet6 ] && echo 'IPv6: System ready' || echo 'IPv6: No kernel support found' ) | tee -a sb-output.log

RESPONSE=\`curl -s -F "upload[upload_type]=unix-bench-output" -F "upload[data]=<sb-output.log" -F "upload[key]=$EMAIL|$HOST|$PLAN|$COST" -F "private=$PRIVATE" $UPLOAD_ENDPOINT\`

echo "Uploading results..."
Expand Down