Thread: sdbackupbytime?
View Single Post
  #14  
Old 07-02-2020, 07:21 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,669
Send a message via AIM to dnanian
Periodic tasks run by launchd need a spec, in their plist, for when they should run. One daemon can either run "forever" and then schedule internally - which would take more resources, and kind of go against the whole way launchd is supposed to work - or it can use the existing system.

We use the existing system and run once a minute.
A wake event is, indeed, scheduled for the time of the next backup - let's say 5pm. And if the Mac is asleep, we're neither running not logging. The wake happens, and we run immediately and check what we need to do.

Smart Wake needs to run before the wake event (see the blog post about Smart Wake from a few years ago - I think It's called "The Best UI is No UI" - for a discussion of this). That's all handled by this little daemon.

When it runs, it performs a few tasks, and log informationally about those tasks in a relatively minimal manner - again, four lines of logging, once a minute.

The system is logging zillions of lines of logging all the time. We're logging four lines. Those lines are being logged to a facility that's designed to manage millions of lines.

It needs to do these things for SuperDuper to work. I don't do things randomly. They have minimal if any effect on your system.

Could I eliminate that logging? Yes, I could. But then when things go wrong, I wouldn't have any diagnostics to work with. That's why I'm logging in the first place.

You said there are "thousands and thousands of entries, just in a few hours". In a few hours - let's say three - there would be a total of 720 log entries from sdbackupbytime. Not even a single thousand.

Yes, those entries are a bit repetitive. That's because it's always doing the same thing. And it's logging information about that.

A daemon has no interface. It's a background process. I can't show status. This is how that status is logged.

What do I gain from this logging? Well, let's say someone indicates a schedule didn't run. The logging shows me what the daemon was doing around the time of the schedule. By examining this logging after the fact, I can determine whether the daemon encountered an error, or perhaps wasn't run by launchd for some reason.

This is the way things are done, using the facilities provided by macOS, in the way they're designed to be used.
__________________
--Dave Nanian
Reply With Quote