Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-18-2005, 02:13 PM
edoates edoates is offline
Registered User
 
Join Date: Jul 2005
Posts: 44
Scripting and the Log

I'm a scripting newbie (though a programmer of other stuff for 40 years: remember Fortran?) and have question:

I'd like to add notification to the SD scripts to send me email upon script completion with a summary of the results: xx files (or GB) copied or ERROR SD did not complete type of thing. Can you provide a quick pointer on how to do that?

Second: is there a way to make the LOG less verbose? If I'm just backing up my iTunes music library (on a separate drive from my system), apparently I first have to make the script "ignore" everything, then add a "copy" for the music directory (is that correct). When I look at the log, it literally has hundreds of "ignored" entries to scan through to find the few "copied" entries. Is there a way to shorten the log?

Ed
Reply With Quote
  #2  
Old 07-18-2005, 02:21 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Hi, Ed.

What I'd do is use Unix's "tail" command on the log, and then hunt through that to find the completion command with grep. (You can execute a shell script with applescript without much trouble -- that's what the lines that run "sleep" do.

Alternatively, you could use AppleScript to read/parse the log, but that'd probably be more difficult.

Regarding the log: alas, no. At present you can't make it less verbose, but I'll log that as an suggestion for the future.

Does that help?
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 07-18-2005, 02:35 PM
edoates edoates is offline
Registered User
 
Join Date: Jul 2005
Posts: 44
You must have your Mac email directly connected to your brain (kind of like my wife and her Treo 650, but I digress).

Yes, that helps and was sort of what I thought I'd need to do. It would be neat if SD could post values to script variables (completion code, # files copie, #ignored, bytes copied, elapsed time). Then I could get all that stuff directly rather than depending upon the log format to remain unchanged from version to version so that grep would work correctly.


Ed

Last edited by edoates; 07-27-2005 at 02:09 PM.
Reply With Quote
  #4  
Old 07-18-2005, 02:38 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
At some point, we might post events to the scripts, Ed, which would allow this kind of thing to happen... but at the moment, it's of lower priority than some other stuff!
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 07-27-2005, 02:10 PM
edoates edoates is offline
Registered User
 
Join Date: Jul 2005
Posts: 44
Using the log to reflect completion stats

looked at the log and noticed that "scanned" shows me total items and size, including the "ignored" stuff (most of it); but "copied" and "cloned" show items which were not actually copied with "smart update," but instead reflect the same values as if everything was copied: 6.64GB can't get copied in 2 seconds (see included partial log below). In fact, nothing was copied, this was just a test of the script. Is there a way to get the actual amount of data "copied" during a smart update?

PARTIAL LOG:

|11:19:38 AM|Info| Scanned 7163 items occupying 157.93 GB (496 directories, 6667 files, 0 symlinks)
|11:19:38 AM|Info| Copied 2 items totaling 6.64 GB (1 directories, 1 files, 0 symlinks)
|11:19:38 AM|Info| Cloned 6.64 GB of data in 2 seconds at an effective transfer rate of 3401.39 MB/s
|11:19:38 AM|Info| PHASE: Conclude Target Setup
|11:19:38 AM|Info| ...ACTION: Bless System on Music
|11:19:38 AM|Info| ......COMMAND => Blessing OS X System Folder
|11:19:38 AM|Info| Did not bless Mac OS X System Folder on Music because it does not exist.
|11:19:38 AM|Info| ......COMMAND => Blessing OS 9 System Folder
|11:19:38 AM|Info| Did not bless Mac OS 9 System Folder on Music because it does not exist.
|11:19:38 AM|Info| ...ACTION: Execute Site Customization Script /Applications/Utilities/SuperDuper/Extras/disable_spotlight
|11:19:38 AM|Info| ......COMMAND => Invoking site customization script: /Applications/Utilities/SuperDuper/Extras/disable_spotlight
|11:19:38 AM|Info| Disabling spotlight for /Volumes/Music...
|11:19:38 AM|Info| /Volumes/Music:
|11:19:38 AM|Info| Volume index removed.
|11:19:38 AM|Info| Indexing disabled for volume.
|11:19:38 AM|Info| Copy complete.

END PARTIAL LOG
Reply With Quote
  #6  
Old 07-27-2005, 06:39 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Yep. We show the size of the data scanned, not the size of the data copied. We know: it *might* change in the future... but for now you can only get a count, and not the size.
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:46 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.