[Box Backup] Logging

E.W. Peter Jalajas boxbackup@fluffy.co.uk
Thu, 18 May 2006 15:14:26 -0700 (PDT)


--- Chris Wilson <chris@qwirx.com> wrote:

> Hi Pete,
> 
> > There are a few log-relatd feature requests at: 
> > http://boxbackup.hostworks.ca/index.php/Feature_requests Some are
> more 
> > obviously log-related than others.  Stuart's and mine there are 
> > definitely.
> 
> Thanks for pointing that out. I guess you mean the following
> requests:

Sorry for my laziness...  (I'm afraid to ask, are there other pages on
the wiki that might yield logging ideas, while you're there under the
hood?  Future plans, 0.20 plans, Troubleshooting?  Sorry.)

> 1. Prefix bbstored log messages with the client account number
> 2. In Windows Event Viewer, change "Exceeded storage limits" to
> Warning
> 3. Log good and bad results of proposed housekeeping health check
> 4. Log "not uploading changes to files" when appropriate on the store
> 5. Log amount of bandwidth used by each client session (if not
> already)
> 
> Did I miss any?

Nope, good, thanks.

> The first two are definitely related to the logging infrastructure.
> 
> For number 1, I've added a little bit to the logging spec 
> (SetContext/ClearContext) which would make it easy to log this
> information 
> in bbstored.
> 
> Number 2 is trivial, I've just checked it into my tree.
> 
> Numbers 3-5 require additional work to other parts of the store
> daemon, 
> which would then use the new logging infrastructure. I'm not
> proposing to 
> implement these right now.
> 
> > Traffic related?
> 
> By traffic related, do you mean logging the amount of bandwidth used?

Yeah, I was just parroting what was in the feature request.

> > Client vs server logging differences?
> 
> "Client" and "server" are tricky terms to use here. Both bbackupd and
> 
> bbstored run as daemons, and their principle means of logging should
> be 
> syslog. As you correctly pointed out, bbstored handles multiple
> clients, 
> so it should identify messages that relate to a particular client
> with the 
> client's account number. 

Please see my feature request about keeping the account numbers in the
logs consistent.  I've since started making my account numbers as 8
characters starting with a non-zero, like 10001234, so that it appears
the same (I think) in all the different log entries, but before that,
my log grepping scripts had to trap the different formats of the
account numbers (case, leading zeros, leading 0x(?), e.g.).

Apart from that, I can't see any obvious
> reason 
> for differences.
 
My angle, as the store server admin, as listed in my feature requests,
is that I need to constantly monitor my machine as much as possible to
make sure my customers' data are safe.  I won't have ready access to
the client logs (and actually don't want to have to reach out to what I
hope will be dozens and dozens of them), so I need to store server to
be fairly chatty about how things are going, and to rely on the client
to somehow get what might be a lot of info into the store server log.  

For example, and this relates to your Scheduled Task item below, in my
feature request:
Add automated periodic compare to client. Maybe a daily quick compare
and a weekly late-night full (or nearly so) compare.
http://lists.warhead.org.uk/pipermail/boxbackup/2006-February/002240.html
(PJ)
it'd be nice if I could see the results of those client-run compares in
the store-server log somehow. 

> On the other hand, the command-line utilities, like bbackupquery and 
> bbackupctl, would probably use the console logger exclusively, rather
> than 
> logging anything to syslog. Does that make sense to everyone? Should
> there 
> be a flag to make them log to syslog, for example to run them as
> scheduled 
> tasks on Windows where there's no Cron?

(Not knowing anything about it, except that I am at the moment making
backup copies of commercial dvds [Led Zeppelin, Buckethead; to keep my
kids from scratching the originals] using cdrecord with the dvd patch
and I happened to notice that it carries a cygwin1.dll with it, so I
wonder if that would be a useful trick to use to set up a cygwin cron
service to do what you need it to do?  Sorry if that is way off.)