LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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



Reply
 
Search this Thread
Old 03-19-2008, 06:22 PM   #1
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
Question 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
 
Old 03-23-2008, 06:48 PM   #2
Retrievil_Knievil
Member
 
Registered: Mar 2004
Location: Stavanger, Norway
Distribution: Gentoo, Slackware/SLAX, Knoppix, CentOS, IPCop & DSL
Posts: 138

Rep: Reputation: 21
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.
 
Old 03-23-2008, 06:56 PM   #3
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
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
 
Old 03-24-2008, 03:05 AM   #4
Retrievil_Knievil
Member
 
Registered: Mar 2004
Location: Stavanger, Norway
Distribution: Gentoo, Slackware/SLAX, Knoppix, CentOS, IPCop & DSL
Posts: 138

Rep: Reputation: 21
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync --progress is there one with just files left? MikeyCarter Linux - Software 0 07-11-2007 11:45 AM
Installing RedHat 8.0 onto Dell PowerEdge SC1425 - hdc: status error: status = 0x58 fishsponge Linux - General 0 07-11-2006 10:02 AM
My LFS Progress/Status. rvijay Linux From Scratch 15 01-28-2005 10:42 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 03:49 PM
LQ member progress status from member to senior member............. emailssent LQ Suggestions & Feedback 3 10-11-2004 02:31 PM


All times are GMT -5. The time now is 06:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration