Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remotely restart Timbuktu when it stops responding Apps
I've been using Timbuktu for many years now, and like SSH Bouncing (a problem I solved in an earlier hint), after upgrading to Leopard, I also found that occasionally Timbuktu would go deaf, leaving me unable to connect to Timbuktu on my home machine while at work. SSH would still work, but that was useless to, say, open up Quicken and enter in what I spent for lunch.

I was able to remotely restart my machine via sudo shutdown -r now, and Timbuktu would work fine on restart, but that would forcibly crash anything on my home machine that had been open. I wished that Timbuktu had the plethora of command-line options that Apple Remote Access did.

Later it occurred to me that perhaps in the same way that it's possible to restart some UNIX processes with a HUP signal, maybe I could do that with Timbuktu. And it worked! So all you GUI folks will have to delve into Terminal, but here's how you can restart Timbuktu on a remote machine without a messy wholesale reboot. Really, don't be afraid.

Here's how I do this:
  1. Open Terminal and connect to the remote machine via SSH (a port that's open anyway since we all set Timbuktu to only use SSH encrypted connections these days, right?) by typing:
    where username is your admin user ID on the remote machine (you must be an admin!), and is the IP number or DynDNS name or whatever internet name you use to normally reach the target machine.
  2. Once connected, type:
    ps aux | grep Timbuktu | grep root
    Remember that on the command line, case matters -- so don't forget that capital T! What we just did was use the ps command to show running processes, filtering for only those belonging to Timbuktu, and then from that list, filtering for only the ones running as the superuser (root) -- "The One over all."

    In my example below, this returned one line of textual information, but sometimes I see two (still not sure why sometimes I see one, sometimes two). Either way, you'll see something like this:
    root 15883 0.1 0.3 457348 6288 ?? S 12Mar09 153:23.42 /Applications/Timbuktu Pro/Timbuktu Host
    If you're not command line proficent, don't worry! You only care about the number in the second column (15883 in this example). That's the PID (Process ID), and you're going to send it a HUP signal, equivalent to a restart. The number you see will (more than likely) not be 15883, but that's OK. Just note whatever number you see there.
  3. Type sudo kill -1 15883 (again, you substitute whatever number you saw in the above output for the 15883 in my example. You'll be asked for your admin user password, so type it in and press Return. If you saw two lines when you ran the ps command, then type the kill line one more time, this time substituting the PID from the second column of the second line you saw.
That's it, your stalled Timbuktu has been restarted! Optionally, you can rerun the ps command from step two to verify that it is indeed running (note the new PID number(s)). If you're really curious, run the ps command without the grep parts to see process lines for everything running on your Mac.

But you don't have to. Type exit to quit the remote shell, and you can connect with Timbuktu as normal now.
  • Currently 2.60 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)

Remotely restart Timbuktu when it stops responding | 6 comments | Create New Account
Click here to return to the 'Remotely restart Timbuktu when it stops responding' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remotely restart Timbuktu when it stops responding
Authored by: robdew on Mar 25, '09 07:51:41AM

Does Timbuktu no longer support OSA?

[ Reply to This | # ]
Here's a shortcut for steps 2 and 3
Authored by: mzs on Mar 25, '09 08:17:42AM

sudo killall -HUP Timbuktu

[ Reply to This | # ]
Here's a shortcut for steps 2 and 3
Authored by: leamanc on Mar 25, '09 09:24:33AM

Don't think that will work, but this would:

sudo -killall HUP "Timbuktu Host"

[ Reply to This | # ]
Remotely restart Timbuktu when it stops responding
Authored by: bukweet on Mar 25, '09 08:37:48AM
Great tip! I'll try this one out tonight.
Now, does anyone have a method to remotely wake a sleeping Mac over the WAN (behind an Aiport router, which doesn't pass a wake-up packet)?


[ Reply to This | # ]

Remotely restart Timbuktu when it stops responding
Authored by: mzs on Mar 25, '09 09:27:48AM

I have never encountered a computer that can wake when receiving a magic packet over wifi, only ethernet cable. If that is what you mean, I think it is hopeless.

If you have the computer connected via an ethernet cable to the airport base station then there may be hope. You need the base station to either have a static ARP table entry for the computer or the base station needs to broadcast the magic packet. I have no idea if airport base stations can do that, I've never used them. If you try to just send a magic packet and the router (base station) does not have an ARP table entry for the IP addr, it will first do the "ARP who has ..." and not hear back, so it will never send the magic packet to wake the computer. I successfully use the broadcast the magic packet to wake the computer from a linksys AP running tomato that I ssh into.

[ Reply to This | # ]
Remotely restart Timbuktu when it stops responding
Authored by: msilverman on Mar 25, '09 09:18:18AM

There's actually a built-in command line way to restart Timbuktu after you ssh into the machine.

First navigate inside the Timbuktu application bundle. If you have it installed in the usual place (inside its folder in /Applications), type

cd /Applications/Timbuktu\ Pro/Timbuktu\

then run the TimbuktuInstaller command as superuser, passing it a single parameter, the path to the Timbuktu

sudo ./TimbuktuInstaller /Applications/Timbuktu\ Pro/Timbuktu\

And Timbuktu will cleanly restart itself.

[ Reply to This | # ]