Roxio Toast Titanium on Mac OS X opening / running very slow – hello DTrace!

ToastIf you find Toast is running very slow on your Mac and you've tried all the other fixes, check to make sure you don't have any mounts defined on your Mac as Toast will continue to try and mount them ad nauseum – thereby causing the slowness.  You can check Directory Utility to see if there are mounts you forgot about.

If that's not it, it is time to embrace the built-in DTrace tools Mac has for your computing pleasure.  This can help you track the calls Roxio makes when it's appears to be running dog slow.

Dtruss is very much like truss or strace – it will show you system calls made by whatever you are dtrussing.  If what you are trying to figure out is shortlived, execsnoop is also your friend as it will show you system calls for any new processes as they are spawned.

Dtruss and execsnoop show when Toast starts up that automountd is always called, thus stale NFS mounts could be causing you headaches.

Finding / Eliminating rogue NFS mounts in Mac OS X

LionThere is a handy utility called Directory Utility which allows you to configure connections to directory servers.  It also contains information for persistent NFS mounts across reboots.  If you ever wondered where these phantom mounts came from or you are trying to eliminate a mount that no longer exists go to /System/Library/CoreServices/Directory Utility.

From within Directory utility, click on Directory Editor and then select Mounts from the Viewing categories.  There you will find all mounts and add/remove as required.

 

Installing Spotify on Fedora

Spotify-logo So Spotify is finally available in the US, which is good news for those who are getting tired of Pandora. Hell, Pandora played Celine Dion on my Hardcore Punk Radio Station the other day…wtf.

So anyway, I decided to sign up and was disappointed to find that they did not have an official linux client, However they do publicize an Ubuntu client here, however, since I run Fedora this is not much interest to me.

Thankfully the Europeans have already figured out how to get Spotify running on other linuxes natively, and google found this link on installing the Debian packages on Fedora 13. I am glad to report that these instructions also work on Fedora 12. So far so good on Fedora 12.

However i decided to explore their repo a bit and found that in fact they do have rpm packages. Check out the link below. Sneaky.

http://repository.spotify.com/fedora/

I bit more googling found me this link which contains instructions on installing via the apparently secret rpms.

Btw, if you are a jackass and want to run Spotify under Wine for some reason, click here for instructions.

Bind – Zone File Serial Number Reset

Lemo-the-worm Each and every zone file has a unique serial number and that serial number should increment with each subsequent revision

A serial number is traditionally in the format (YYYYMMDDSS) where SS the sequence number. For example, today is 1/21/2011, so the serial number in a zone file modfied today would be… 201101210.

So lets say that you pushed that zone today and when you went back to make an additional change, you accidentally added an additional number to your serials and instead of  201101211 you ended up with 2201101211.

In order to get everything back in order you will need to manually reset the zone file's serial number by setting it to the number below. Its highest number you can get using 32 bits.

4294967295

To to reset your serial number, update your zone file with the serial number listed above and push it out to the slaves. Then change your zone files serial number back to the correctserial number, which will be considered to be greater than the magic number above. Then push dns again.

Check your slave servers and verify the the zone file now has the correct serial.

 

 

Rsync How to

Rsync is a very very useful command with a whole bunch of options. However most of the time if you run rsync on the command line you only need to know a few.

#rsync -avz foo:src/bar /data/tmp

This would recursively transfer all files from the directory src/bar
on the machine foo into the /data/tmp/bar directory on the local machine.

The files are transferred in “archive” mode, which ensures that symbolic links,
devices, attributes, permissions, ownerships etc are preserved in the transfer.
Additionally, compression will be used to reduce the size of data portions of the transfer.

#rsync -avz foo:src/bar/ /data/tmp

A trailing slash on the source changes this behavior to transfer all files
from the directory src/bar on the machine foo into the /data/tmp/.

A trailing / on a source name means “copy the contents of this directory”.
Without a trailing slash it means “copy the directory”.

This difference becomes particularly important when using the –delete option.

Below are a few of the options that I find useful.

What to Copy:
-r recursive

How to Copy:
-n dry run
-g preserve group

Destination Options:
-a archive
-b backup

Syntax Examples:
rsync [OPTION]… SRC [SRC]… [USER@]HOST:DEST
rsync [OPTION]… [USER@]HOST:SRC DEST
rsync [OPTION]… SRC [SRC]… DEST
rsync [OPTION]… [USER@]HOST::SRC [DEST]
rsync [OPTION]… SRC [SRC]… [USER@]HOST::DEST
rsync [OPTION]… rsync://[USER@]HOST[:PORT]/SRC [DEST]
rsync [OPTION]… SRC [SRC]… rsync://[USER@]HOST[:PORT]/DEST

mkisofs – Make an iso from a cd or directory

Anisoiconthumb944940 This morning while working on getting a CentOS Jumpstart Server setup with a Knoppix rescue boot image I ran across the following simple utility mkisofs. It was not installed on my box so I had to get it via yum.

In the example below I created an iso from a directory knoppix51
mkisofs -o knoppix51.iso knoppix51

Below are the common usage options:

mkisofs [-a] [-b boot_image] [-c boot_catalog]
        [-A application_id] [-f] [-d] [-D] [-i include-list]
        [-l] [-L] [-p preparer] [-P publisher] [-r] [-R]
        [-T] [-v] [-V] [-V volid] [-x path] [-z] [-m glob]
        -o filename path

Here is how to use mkisofs to make an iso from a cd/dvd


  dd if=/dev/dvd of=dvd.iso    # for dvd
 
dd if=/dev/cdrom of=cd.iso   # for cdrom
 
dd if=/dev/scd0 of=cd.iso    # if cdrom is scsi

You can also download it from http://freshmeat.net/projects/mkisofs/

RotateLog

More often than not I run into applications that do not know how to clean up after themselves or their log files. On a couple of my boxes, there are applications that have two years of logs squirreled away, just taking up space. Since the application owners do not seem to care about these logs, and do not seem to have any intention of removing any of these logs, I decided to try rotatelog which I used at my old job.

One of the nice things about rotatelog is its config file. A sample file is shown below. After running "make install" all I needed to do was edit a few paths in the rotatelog script.

 FILES:

  # File  Trigger  Owner:Group  Mode  Compress  Archive_Limit

 # =========================================================

  /var/log/wtmp      1M   root:wheel  664  none  4

 /var/log/wtmpx     4M   root:wheel  644  none  4
/var/log/messages  74K  root:wheel  664  Z     5
/var/log/maillog   60K  root:wheel  664  gz    7

 

 ACTIONS:

 

 # Shell Command :file1,file2,file3 ... fileN
# ==========================================

  rotate1                             : /var/log/wtmp,/var/log/wtmpx

 kill -HUP `cat /var/run/syslog.pid` : /var/log/messages,/var/log/maillog

 

 NOTIFY:

 

 # Person to email rotation notification
# =====================================

Rotatelog installed itself to /usr/local/sbin/rotatelog, and created its config file to /usr/local/etc.

After giving it a test, I then I added it to crontab, and let it rip.
Learn more about rotatelog here