Skip to content

Instantly share code, notes, and snippets.

@ajkis

ajkis/seektest Secret

Created February 2, 2019 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajkis/657d2e4eeee6f619e58ca05953164f8c to your computer and use it in GitHub Desktop.
Save ajkis/657d2e4eeee6f619e58ca05953164f8c to your computer and use it in GitHub Desktop.
#!/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