Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
03-19-2008, 05:22 PM
|
#1
|
|
Member
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 517
Rep:
|
A progress status for Rsync??
Hi All,
I'm looking for and trying to create some kind of a progress indicator with rsync to help make things a little more obvious at roughly how much time or a rough percentage there is left of the rsync process to copy. I have already kind of created a script that does this however its not at all reliable and it doesn't seem to work either....the script i have at the moment basically looks at the folder and the size of it...then looks at the value of sent bytes in ifconfig for the network interface and then basically divides the folder size by 100 and that gives you an amount of bytes that need to be sent for each percent the process should move up one step. I hope you catch my drift and obviously this is certainly not a great method..most of all i can't get the number of bytes retunrned from 'du' and number of bytes transfered to compare very well..for several reasons.
So i know about --progress but this is not really what i'm looking for ... or it is but --process gives you a progress on a per file basis and i'm looking for a progress on the entire copy basis which i haven't found that rsync can do hence why i'm trying to write my own script to help me with the problem. One other way that might be reasonable would be if i could work out the number of files to be transfered perhaps with rsync in 'dry-run' mode and then somehow count each file rsync has transfered this would give some osrt of indicator...however it would look like the thing has got paused if transferring a very large file so it wouldn't be an even like progress indicator.
Has anyone any ideas..or can rsync give you an over all progress but i've not found it yet??
Cheers,
Mark
|
|
|
|
03-23-2008, 05:48 PM
|
#2
|
|
Member
Registered: Mar 2004
Location: Stavanger, Norway
Distribution: Gentoo, Slackware/SLAX, Knoppix, CentOS, IPCop & DSL
Posts: 138
Rep:
|
Rsync
Hi,
I've been thinking about the same, but never gotten round to it...  I think you are on the right track if you use a dry-run to check out how many files you have to transfer, but to do it well, you'd also have to check the file sizes to calculate this reliably. But still, how reliable does it have to be?
If you use keychain, you could also make a loop to do the files in the list from the dry-run, then you could make a counter AND use Rsync's details as well, but that might be difficult, and present it's own problems.
|
|
|
|
03-23-2008, 05:56 PM
|
#3
|
|
Member
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 517
Original Poster
Rep:
|
hello,
Thanks for the reply.. yes its almost one of the bigest things i cn say that the rsync protocal lacks in which is a shame, and maybe who knows it might be incorporated into future version. Yea the way i'm going to do it because its reasonably simple is the dry run method..then count the number of files that should have been sent. Then during the transfer have the rsync output to a file and then have a script basically counting the newlines inside the file ...basically meaning the number of files and then getting the percentage this way. Although when tranfering large files its going to look almost like the rsync might have died...i still think this is the best way....it may also be possible to use incorporate the --progress into the rsync and then for each file use the percentange complete of that transfer as a second progress bar then showing...state of transfer of files left as well as enabling the fact you can see if the file currently being transfered is a lage file....therefore not making someone think that perhaps the rsync has crashed.. I think this is the method i will set-up and create when i get round to it...
Cheers,
Mark 
|
|
|
|
03-24-2008, 02:05 AM
|
#4
|
|
Member
Registered: Mar 2004
Location: Stavanger, Norway
Distribution: Gentoo, Slackware/SLAX, Knoppix, CentOS, IPCop & DSL
Posts: 138
Rep:
|
I think your have the concept right, now to find time for the coding...  If you post your progress here, you'll probably get all the input/bright ideas you might need... 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:26 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|