Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-13 Thread Jan Stransky

I like this one :-)

On 1/13/21 8:15 AM, Johan Ehnberg wrote:


On 13.1.2021 0.58, Adam Goryachev via BackupPC-users wrote:


On 13/1/21 09:21, Les Mikesell wrote:
On Tue, Jan 12, 2021 at 4:15 PM Greg Harris 
 wrote:
Yeah, that “if you can interpret it” part gets really hard when it 
looks like:


select(7, [6], [], [6], {tv_sec=60, tv_usec=0}) = 1 (in [6], left 
{tv_sec=59, tv_usec=99})
read(6, 
"\0\200\0\0\4\200\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
32768) = 27748


Scrolling at 32756 lines in around 30 seconds.

That tells you it is not hung up.  You could grep some 'open's out of
the stream to see what files it is examining.  Sometimes the client
side will do a whole lot of reading before it finds something that
doesn't match what the server already has.


I tend to use something like:

strace -e open -p 

Also:

ls -l /proc//fd

Regards,
Adam



Here's another one to run on the host being backed up. It shows the file 
being backed up (read, not necessarily transferred) at any given time. 
You may want to tune the refresh rate; '0.1' is very rapid. '3r' can in 
theory vary between implementations.


sudo watch -n0.1 'lsof -c rsync | grep 3r'


Best regards,
Johan

--
Signature
*Johan Ehnberg*

Founder, CEO

Molnix Oy


jo...@molnix.com 

+358 50 320 96 88

molnix.com 


/The contents of this e-mail and its attachments are for the use of the 
intended recipient only, and are confidential and may contain legally 
privileged information. If you are not the intended recipient or have 
otherwise received the e-mail in error, please notify the sender by 
replying to this e-mail immediately and then delete it immediately from 
your system. Any dissemination, distribution, copying or use of this 
communication without prior and explicit permission of the sender is 
strictly prohibited./


/*Please consider the environment - do not print this e-mail unless you 
really need to.*/




___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/




___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-13 Thread Greg Harris
The ls rendition is super useful, and keeps extra packages off the machine.   
Thanks for that one.

Thanks,

Greg Harris

On Jan 12, 2021, at 5:58 PM, Adam Goryachev via BackupPC-users 
mailto:backuppc-users@lists.sourceforge.net>>
 wrote:


On 13/1/21 09:21, Les Mikesell wrote:
On Tue, Jan 12, 2021 at 4:15 PM Greg Harris 
mailto:ghar...@teamexpansion.org>> wrote:
Yeah, that “if you can interpret it” part gets really hard when it looks like:

select(7, [6], [], [6], {tv_sec=60, tv_usec=0}) = 1 (in [6], left {tv_sec=59, 
tv_usec=99})
read(6, 
"\0\200\0\0\4\200\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
32768) = 27748

Scrolling at 32756 lines in around 30 seconds.
That tells you it is not hung up.  You could grep some 'open's out of
the stream to see what files it is examining.  Sometimes the client
side will do a whole lot of reading before it finds something that
doesn't match what the server already has.

I tend to use something like:

strace -e open -p 

Also:

ls -l /proc//fd

Regards,
Adam



___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Johan Ehnberg


On 13.1.2021 0.58, Adam Goryachev via BackupPC-users wrote:


On 13/1/21 09:21, Les Mikesell wrote:
On Tue, Jan 12, 2021 at 4:15 PM Greg Harris 
 wrote:
Yeah, that “if you can interpret it” part gets really hard when it 
looks like:


select(7, [6], [], [6], {tv_sec=60, tv_usec=0}) = 1 (in [6], left 
{tv_sec=59, tv_usec=99})
read(6, 
"\0\200\0\0\4\200\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
32768) = 27748


Scrolling at 32756 lines in around 30 seconds.

That tells you it is not hung up.  You could grep some 'open's out of
the stream to see what files it is examining.  Sometimes the client
side will do a whole lot of reading before it finds something that
doesn't match what the server already has.


I tend to use something like:

strace -e open -p 

Also:

ls -l /proc//fd

Regards,
Adam



Here's another one to run on the host being backed up. It shows the file 
being backed up (read, not necessarily transferred) at any given time. 
You may want to tune the refresh rate; '0.1' is very rapid. '3r' can in 
theory vary between implementations.


sudo watch -n0.1 'lsof -c rsync | grep 3r'


Best regards,
Johan

--
Signature
*Johan Ehnberg*

Founder, CEO

Molnix Oy


jo...@molnix.com 

+358 50 320 96 88

molnix.com 


/The contents of this e-mail and its attachments are for the use of the 
intended recipient only, and are confidential and may contain legally 
privileged information. If you are not the intended recipient or have 
otherwise received the e-mail in error, please notify the sender by 
replying to this e-mail immediately and then delete it immediately from 
your system. Any dissemination, distribution, copying or use of this 
communication without prior and explicit permission of the sender is 
strictly prohibited./


/*Please consider the environment - do not print this e-mail unless you 
really need to.*/


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Adam Goryachev via BackupPC-users


On 13/1/21 09:21, Les Mikesell wrote:

On Tue, Jan 12, 2021 at 4:15 PM Greg Harris  wrote:

Yeah, that “if you can interpret it” part gets really hard when it looks like:

select(7, [6], [], [6], {tv_sec=60, tv_usec=0}) = 1 (in [6], left {tv_sec=59, 
tv_usec=99})
read(6, 
"\0\200\0\0\4\200\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
32768) = 27748

Scrolling at 32756 lines in around 30 seconds.

That tells you it is not hung up.  You could grep some 'open's out of
the stream to see what files it is examining.  Sometimes the client
side will do a whole lot of reading before it finds something that
doesn't match what the server already has.


I tend to use something like:

strace -e open -p 

Also:

ls -l /proc//fd

Regards,
Adam



___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread backuppc
Additionally, 'top' only tells you what is happening now (or in the
last few second sampling period).

What I really want to know is when was the last time data was
successfully transferred across the rsync/ssh pipe which generally
would signal that the backup is progressing vs. being stalled on a
yet-to-happen timeout.

The challenge of course is that you want to set the rsync timeout long
enough so that backups don't get inadvertently interrupted, but still
you may want to check on what is happening in case you suspect
something has broken the connection rather than waiting for rsync to
officially time out many minutes or hours later...

Would be very nice to get a better picture of this :)

Greg Harris wrote at about 20:08:33 + on Tuesday, January 12, 2021:
 > While all of that is true, the answers so far still seem to be kind of like 
 > looking at the parking lot outside the ice hockey arena.  (Well, at least, 
 > pre-Covid days anyways.)  Is there a game going on or is it a pre-game show 
 > listing players?  Is the zamboni on the ice?  Which game is in which rink?  
 > Are there injuries? How much time is left?  Who’s being penalized and why?  
 > I’ve yet to find a solid way to peer into the arena of BackupPC and find 
 > answers to these types of questions.
 > 
 > Thanks,
 > 
 > Greg Harris
 > 
 > On Jan 12, 2021, at 2:09 PM, Doug Lytle 
 > mailto:supp...@drdos.info>> wrote:
 > 
 > I tend to look in the top, if rsync is in progres, it its some CPU. It
 > 
 > iotop would be another method
 > 
 > You could also try following the rsync process with strace
 > 
 > Doug
 > 
 > 
 > ___
 > BackupPC-users mailing list
 > BackupPC-users@lists.sourceforge.net
 > List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
 > Wiki:https://github.com/backuppc/backuppc/wiki
 > Project: https://backuppc.github.io/backuppc/
 > 
 > ___
 > BackupPC-users mailing list
 > BackupPC-users@lists.sourceforge.net
 > List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
 > Wiki:https://github.com/backuppc/backuppc/wiki
 > Project: https://backuppc.github.io/backuppc/



___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Les Mikesell
On Tue, Jan 12, 2021 at 4:15 PM Greg Harris  wrote:
>
> Yeah, that “if you can interpret it” part gets really hard when it looks like:
>
> select(7, [6], [], [6], {tv_sec=60, tv_usec=0}) = 1 (in [6], left {tv_sec=59, 
> tv_usec=99})
> read(6, 
> "\0\200\0\0\4\200\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
> 32768) = 27748
>
> Scrolling at 32756 lines in around 30 seconds.

That tells you it is not hung up.  You could grep some 'open's out of
the stream to see what files it is examining.  Sometimes the client
side will do a whole lot of reading before it finds something that
doesn't match what the server already has.
-- 
  Les Mikesell
lesmikes...@gmail.com


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Greg Harris
Yeah, that “if you can interpret it” part gets really hard when it looks like:

select(7, [6], [], [6], {tv_sec=60, tv_usec=0}) = 1 (in [6], left {tv_sec=59, 
tv_usec=99})
read(6, 
"\0\200\0\0\4\200\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
32768) = 27748

Scrolling at 32756 lines in around 30 seconds.

Thanks,

Greg Harris

On Jan 12, 2021, at 5:02 PM, Les Mikesell 
mailto:lesmikes...@gmail.com>> wrote:

On Tue, Jan 12, 2021 at 2:24 PM Greg Harris 
mailto:ghar...@teamexpansion.org>> wrote:

I’ve yet to find a solid way to peer into the arena of BackupPC and
find answers to these types of questions.

Strace'ing the rsync process - possibly at both ends - gives you a
pretty detailed view of what is happening if you can interpret it.

--
   Les Mikesell
lesmikes...@gmail.com


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Les Mikesell
On Tue, Jan 12, 2021 at 2:24 PM Greg Harris  wrote:
>
 I’ve yet to find a solid way to peer into the arena of BackupPC and
find answers to these types of questions.

Strace'ing the rsync process - possibly at both ends - gives you a
pretty detailed view of what is happening if you can interpret it.

-- 
Les Mikesell
 lesmikes...@gmail.com


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Greg Harris
While all of that is true, the answers so far still seem to be kind of like 
looking at the parking lot outside the ice hockey arena.  (Well, at least, 
pre-Covid days anyways.)  Is there a game going on or is it a pre-game show 
listing players?  Is the zamboni on the ice?  Which game is in which rink?  Are 
there injuries? How much time is left?  Who’s being penalized and why?  I’ve 
yet to find a solid way to peer into the arena of BackupPC and find answers to 
these types of questions.

Thanks,

Greg Harris

On Jan 12, 2021, at 2:09 PM, Doug Lytle 
mailto:supp...@drdos.info>> wrote:

I tend to look in the top, if rsync is in progres, it its some CPU. It

iotop would be another method

You could also try following the rsync process with strace

Doug


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Doug Lytle
>>> I tend to look in the top, if rsync is in progres, it its some CPU. It

iotop would be another method

You could also try following the rsync process with strace

Doug


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


Re: [BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread Jan Stransky
I tend to look in the top, if rsync is in progres, it its some CPU. It 
does not, if it hangs.

Jan

On 1/12/21 6:04 PM, backu...@kosowsky.org wrote:

Short of waiting for 'rsync' to timeout, is there any way to see the
current status of an rsync backuppc backup, such as:
- Current average 'transfer rate'
- Time last byte was transferred

Sometimes, especially when backing up laptops, it's hard to know if
the ssh connection has been disrupted and whether rsync is hanging or
not.

I know there are kluges such as looking at
   watch "lsof -nw -u backuppc | egrep ' (REG|DIR) ' | awk '{print $9}'"
Or one can watch the logs...

But it would be good if there were a way to see the actual status of
rsync transfers...


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/




___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/


[BackupPC-users] Checking rsync progress/speed/status

2021-01-12 Thread backuppc
Short of waiting for 'rsync' to timeout, is there any way to see the
current status of an rsync backuppc backup, such as:
- Current average 'transfer rate'
- Time last byte was transferred

Sometimes, especially when backing up laptops, it's hard to know if
the ssh connection has been disrupted and whether rsync is hanging or
not.

I know there are kluges such as looking at
  watch "lsof -nw -u backuppc | egrep ' (REG|DIR) ' | awk '{print $9}'"
Or one can watch the logs...

But it would be good if there were a way to see the actual status of
rsync transfers...


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/