[Boxbackup-dev] Connection statistics NET_IN patch?

Peter Jalajas, GigaLock Backup Services pjalajas at gigalock.com
Mon Aug 1 18:49:35 BST 2011


Hi Chris,

One of the methods I use from the server side to confirm that my
clients are backing up, is to look at the "Connection statistics"
"IN=" values.  For large clients, though, the IN value can be quite
large, even though no significant number of files are being backed up.
 I'm guess that is because the Client and Server are just exchanging
long listings of files.

Here is an example from my log:
Jul 29 15:46:49 srv bbstored client=0x99999999[7083]: NOTICE:
Connection statistics for BACKUP-99999999: IN=110 OUT=1534
Jul 29 19:49:30 srv bbstored client=0x99999999[7959]: NOTICE: Login
from Client ID 0x99999999 Read/Write
Jul 29 19:49:49 srv bbstored client=0x99999999[7959]: NOTICE: Session
finished for Client ID 0x99999999
Jul 29 19:49:49 srv bbstored client=0x99999999[7959]: NOTICE:
Connection statistics for BACKUP-99999999: IN=825 OUT=27193
Jul 29 23:50:02 srv bbstored client=0x99999999[8491]: NOTICE: Login
from Client ID 0x99999999 Read/Write
Jul 29 23:50:19 srv bbstored client=0x99999999[8491]: NOTICE: Session
finished for Client ID 0x99999999
Jul 29 23:50:19 srv bbstored client=0x99999999[8491]: NOTICE:
Connection statistics for BACKUP-99999999: IN=51646 OUT=156
Jul 30 03:52:53 srv bbstored client=0x99999999[9562]: NOTICE: Login
from Client ID 0x99999999 Read/Write
Jul 30 03:53:03 srv bbstored client=0x99999999[9562]: NOTICE: Session
finished for Client ID 0x99999999
Jul 30 03:53:03 srv bbstored client=0x99999999[9562]: NOTICE:
Connection statistics for BACKUP-99999999: IN=89 OUT=653

All of the action for that client happened at Jul 29 23:50:19.  You
can see I cut several strings from the default output already; my next
step was to replace "IN=.*OUT.*\ " with the result of the calculation
of "IN minus OUT"--if that number is large > 0, then some significant
backup is happening.)

I was about to add some code to my daily test script to do that
calculation, but thought something like this (see the +++) might be
acceptable for the masses:

In:   http://www.boxbackup.com/trac/browser/box/chris/general/bin/bbstored/BackupStoreDaemon.cpp?rev=1855
355	        BOX_INFO("Connection statistics for " << commonName << ":"
356	                " IN="  << s.GetBytesRead() <<
357	                " OUT=" << s.GetBytesWritten() <<
+++	                " NET_IN=" << (s.GetBytesRead() - s.GetBytesWritten()) <<
358	                " TOTAL=" << (s.GetBytesRead() + s.GetBytesWritten()));

What do you think?

Thanks,
Pete



More information about the Boxbackup-dev mailing list