Posted on 05-22-2012 08:06 AM
Ok, bear with me, because this is slightly complicated.
I am using Casper Imaging in target mode to image about 700 computers. For an unknown reason, about 1 in 5 will fail to run properly. Everything will appear ok in CI, but the destination computer will exhibit one of a number of issues, such as not booting, not running first run scripts, or booting into safe mode. I am trying to track down the issue. In my quest, I have found that console.app's "System Log Queries" search function does find output from casper imaging that might help me figure this out.. That would be great, except...
The same "System Log Queries" function which catches casper imaging also catches output from diskmanagementd, which is generating about 30 messages every second. I believe this is normal behavior, as it is related to diskutil, which casper imaging executes in a loop to watch for newly connected drives. In any case, the end result is that console only shows the last 4001 system log queries, which means I only have about 2 minutes to look at the output before it goes away. SO...
I want to save the relevant output from console.app to a file as it appears. If I just needed to read from a log file, obviously I could do something simple like:
tail -f relevantlog.log | grep CasperImaging >> file
But the report I need to pull from is not a log file, it's the system log queries database. How can I capture this output, or read directly from the database? I can't find any information about making queries to that database from the command line. Maybe I'm just not looking in the right place.
Also, if anyone has had any experience with Target Mode imaging and has had similar issues, I'd be interested to hear whether you have experienced anything like this and if you were able to resolve it. Thanks!