Last active
March 27, 2017 20:28
-
-
Save henriqueutsch/09a7c04d1c3e0dbfa409dfcd9bcede53 to your computer and use it in GitHub Desktop.
Rclone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Real Time Download Upload | |
#sudo apt-get install sysstat | |
#sudo apt-get install gawk | |
dynamic.12.name=net_download | |
dynamic.12.source=sudo sar -n DEV 1 1 | grep eth0 | tail -n 1 | gawk '{print $5/1024}' | awk '{printf "%.2f\n", $1}' | |
#dynamic.12.regexp=(.*) | |
dynamic.12.postprocess= | |
dynamic.12.rrd=DERIVE | |
dynamic.12.max=0 | |
dynamic.13.name=net_upload | |
dynamic.13.source=sudo sar -n DEV 1 1 | grep eth0 | tail -n 1 | gawk '{print $6}' | awk '{printf "%.2f\n", $1}' | |
#dynamic.13.regexp=(.*) | |
dynamic.13.postprocess= | |
dynamic.13.rrd=DERIVE | |
dynamic.13.min=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install Rclone | |
# http://rclone.org/install/ | |
#Configure Rclone | |
# http://linoxide.com/file-system/configure-rclone-linux-sync-cloud/ | |
#Use nohup to run a command like a process (this command generate the output in a nohup.out file | |
#nohup rclone sync -v --transfers 50 --ignore-existing YourGoogleDrive: /media/MountedDrive/ & | |
#Transferred: 57.905 GBytes (3.815 MBytes/s) | |
#Errors: 3 | |
#Checks: 6236 | |
#Transferred: 1645 | |
#Elapsed time: 4h19m2s | |
#sudo wget http://icons.iconarchive.com/icons/marcus-roberto/google-play/64/Google-Drive-icon.png | |
############################################################################################################# | |
dynamic.10.name=rclone_transferred | |
dynamic.10.source=cat /media/Drive5T/nohup.out | grep 'Transferred' | tail -2 | grep -m1 "" | gawk '{print $2}' | |
dynamic.11.name=rclone_errors | |
dynamic.11.source=cat /media/Drive5T/nohup.out | grep 'Errors' | tail -1| gawk '{print $2}' | |
dynamic.11.rrd=DERIVE | |
dynamic.12.name=rclone_checks | |
dynamic.12.source=cat /media/Drive5T/nohup.out | grep 'Checks' | tail -1| gawk '{print $2}' | |
dynamic.12.rrd=DERIVE | |
dynamic.13.name=rclone_files | |
dynamic.13.source=cat /media/Drive5T/nohup.out | grep 'Transferred' | tail -1| gawk '{print $2}' | |
dynamic.13.rrd=DERIVE | |
dynamic.14.name=rclone_time | |
dynamic.14.source=cat /media/Drive5T/nohup.out | grep 'Elapsed' | tail -1| gawk '{print $3}' | |
dynamic.15.rrd=DERIVE | |
dynamic.14.name=rclone_ram | |
dynamic.14.source=ps -aux | grep -i rclone | tail -2 | grep -m1 "" | gawk '{print $4}' | |
dynamic.15.rrd=DERIVE | |
dynamic.14.name=rclone_cpu | |
dynamic.14.source=ps -aux | grep -i rclone | tail -2 | grep -m1 "" | gawk '{print $3}' | |
dynamic.15.rrd=DERIVE | |
web.status.1.content.8.name=Rclone | |
web.status.1.content.8.icon=Google-Drive-icon.png | |
web.status.1.content.8.line.1="<b>Transferred: </b>"+KMG(data.rclone_transferred, 'G') | |
web.status.1.content.8.line.2="<b>Errors: </b>"+Pad(data.rclone_errors) | |
web.status.1.content.8.line.3="<b>Checks: </b>"+Pad(data.rclone_checks) | |
web.status.1.content.8.line.4="<b>Files: </b>"+Pad(data.rclone_files) | |
web.status.1.content.8.line.5="<b>Elapsed Time: </b>"+data.rclone_time | |
web.status.1.content.8.line.6="<b>CPU: </b>"+Percent(data.rclone_cpu,100) | |
web.status.1.content.8.line.7="<b>RAM: </b>"+Percent(data.rclone_ram,100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment