Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

10.5: Monitor Time Machine activity via GeekTool System 10.5
I've been having some problems getting Time Machine to work properly, and I've grown tired of opening the Time Machine System Preferences pane just to see if Time Machine executed when it was supposed to. Using GeekTool -- which runs well on Leopard -- I'm now able to get a regular status report effortlessly, which has eased my mind considerably since I now know Time Machine is working properly.

Create a new shell entry in GeekTool, and enter the following command: This scans the system log file for the last three entries from backupd, displaying them on the desktop. Use whatever refresh value you'd like; 10 minutes is good enough for me.

I'm also able to monitor remote Time Machine activity from other computers backing up to a local disk connected to my computer. Just use this command in GeekTool: If you've set up passwordless ssh login, you're golden.

[robg adds: I haven't tested this one.]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[16,635 views]  

10.5: Monitor Time Machine activity via GeekTool | 7 comments | Create New Account
Click here to return to the '10.5: Monitor Time Machine activity via GeekTool' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
10.5: Monitor Time Machine activity via GeekTool
Authored by: dbs on Fri, Dec 21 2007 at 10:15AM PST
In 10.5 you should not use the system.log file for accessing logged events. Instead use the "syslog" program to directly query for new events. Check out "man syslog" to see how to do it. (The system.log file is apparently generated by syslog for backwards compatibility only.)

[ Reply to This | # ]
10.5: Monitor Time Machine activity via GeekTool
Authored by: rjbailey on Fri, Dec 21 2007 at 10:53AM PST
"man syslog" seems to indicate that syslog is a C routine. Not much help here.

[ Reply to This | # ]
10.5: Monitor Time Machine activity via GeekTool
Authored by: CarlRJ on Tue, Mar 18 2008 at 12:04PM PDT
syslog is in both section 1 (commands) and 3 (libraries) of the manual. To override the man's guess of which you wanted to see (i.e. get to the page for the syslog command), use: man 1 syslog

[ Reply to This | # ]
10.5: Monitor Time Machine activity via GeekTool
Authored by: freddiepingpong on Wed, Jan 2 2008 at 4:31PM PST
Syslog (full name: Apple System Log Utility) works fine for me. I'm still trying to figure out the usage, but it looks quite powerful.

[ Reply to This | # ]
10.5: Monitor Time Machine activity via GeekTool
Authored by: freddiepingpong on Wed, Jan 2 2008 at 4:54PM PST
Using syslog as suggested above, the query then is:

syslog -F ‘$Message' -k Sender /System/Library/CoreServices/backupd -k Time ge -5m

I got that from http://www.stopbeingcarbon.com/2008/01/time-machine-notification-with-growl/ from a posting on using an Applescript to get a Time Machine Growl notification, which is what I was trying to accomplish.

[ Reply to This | # ]
10.5: Monitor Time Machine activity via GeekTool
Authored by: paole on Mon, Sep 7 2009 at 4:13PM PDT
in OS-X.6 Snow-Leopard it has to be:
syslog -F '$Time $Message' -k Sender com.apple.backupd -k Time ge -72h | tail -n 25


[ Reply to This | # ]
10.5: Monitor Time Machine activity via GeekTool
Authored by: mosius on Wed, Sep 16 2009 at 9:32PM PDT
I found a way to get just the last time a backup was complete. I wasn't too concerned with all the activity, I just wanted to know when it was last completed.

There's some basic timezone support and the way I laid it out I think you could figure out how to customize the format of the date output fairly easily.

#! /bin/sh

# Your computer's timezone offset
OFFSET=`date "+%z" | cut -c 1-3`

# All the following is in ZULU (GMT) time
YEAR=`grep -m 1 "<date>" /private/var/db/.TimeMachine.Results.plist | cut -c 8-11`
MONTH=`grep -m 1 "<date>" /private/var/db/.TimeMachine.Results.plist | cut -c 13-14`
DAY=`grep -m 1 "<date>" /private/var/db/.TimeMachine.Results.plist | cut -c 16-17`
ZULU_HOUR=`grep -m 1 "<date>" /private/var/db/.TimeMachine.Results.plist | cut -c 19-20`
MINUTE=`grep -m 1 "<date>" /private/var/db/.TimeMachine.Results.plist | cut -c 22-23`
SECOND=`grep -m 1 "<date>" /private/var/db/.TimeMachine.Results.plist | cut -c 25-26`

# Corrects for your computer's timezone
HOUR=`expr $ZULU_HOUR + $OFFSET`

# If the TZ shift rolled you back a day you have to adjust the DAY
# If the Day rolls to 0, I didn't bother with the roll back because of the huge issues
# of which month you roll back on and what not. The proper solution would be to do proper
# date math, but I haven't figured out how to do that in shell unless you're using the
# current system time. But here, I'm using a generated time.
if [ $HOUR -lt 0 ] ; then
HOUR=`expr '24' + $HOUR`
DAY=`expr $DAY - '1'`
fi

# Just for formatting. It adds the preceding zero to the number if it's a single digit.
if [ $HOUR -lt 10 ] ; then
HOUR=`echo 0$HOUR`
fi

echo "$MONTH.$DAY $HOUR:$MINUTE"


[ Reply to This | # ]