Skip to content

Instantly share code, notes, and snippets.

@ajkis ajkis/seektest Secret
Created Feb 2, 2019

Embed
What would you like to do?
#!/bin/bash
# Install go
# Download https://github.com/ncw/rclone/blob/master/cmd/mount/test/seek_speed.go
# Add File's on line 10
# Change path to seek_speed.go script on line 27
LogFile=/home/plex/logs/rctest.log
Files=(
'/mnt/dropboxcrypt/tmp/100M.file'
'/mnt/gdrivecrypt/tmp/100M.file'
)
echo "$(date "+%d.%m.%Y %T") SPEEDSEEK TESTS STARTED" | tee -a $LogFile
echo " " | tee -a $LogFile
echo "UNIONFS MOUNT" | tee -a $LogFile
ps -e -o cmd | grep "[u]nionfs-fuse" | tee -a $LogFile
echo " " | tee -a $LogFile
echo "RCLONE MOUNT" | tee -a $LogFile
ps -e -o cmd | grep "[r]clone mount" | tee -a $LogFile
echo " " | tee -a $LogFile
for File in "${Files[@]}"
do
echo "SEEKSPEED $File" | tee -a $LogFile
start=$(date +'%s')
go run /home/plex/scripts/seekspeed.go "$File" | tee -a $LogFile
echo "Finished in $(printf '%dm:%ds\n' $(($(($(date +'%s') - $start))%3600/60)) $(($(($(date +'%s') - $start))%60)))" | tee -a $LogFile
echo "FileSize $(du -h "$File" | awk {'print$1'})" | tee -a $LogFile
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.