Customize your OS X clock and use it as a system lockup monitor
Written by: hexley on Wednesday April 16th 2008, 3:35 am
Filed under: Finder, Misc
It’s just a clock, how in the heck can it be used to tell you if your system is locked up? To be honest, it really can’t. However, I have used this tactic since way back in the OS 9 days, and it still works pretty darn well under OS X.
First I will start with the basics, customizing the clock, what you can change, and why you may want to. After a small history lesson in how OS 9 was not as smartly multi-threaded as OS X, I can then explain just how you can use your clock as a visual aid to tell you if your computer is stuck.
System clock customization
Unless you have moved your clock elsewhere, it should still be sitting in the upper right corner of your screen. If you click on it, you can select the last item in the list: Open Date & Time.
Once the Date & Time preference pane is open, you should see there are three “tabs” at the top. The first one, Date & Time, allows you to select if you want the clock to set itself automatically. You can also set the date here as well. As long as you have an Internet connection, OS X will poll what is called a time server every now and then. In most cases, you should never have to worry about your date or time being off by more than a few seconds.
The second tab in the Date & Time preference pane allows you to choose your time zone. This is important to do, as we all live in different time zones. Daylight Saving Time has been moved around a bit over the years; the time zone you pick, ensures you never have to think about setting your clock to do the “fall back” or “spring forward” routine.
And finally, the last tab is the Clock tab. And it is this area I will explain how to set in a certain way to help you determine system lock ups. The options here are pretty self-explanatory.
If you use the Analog clock, this tip is not going to be of much help to you.
The key here is to set it to “display the time with seconds”, or at the very least, “Flash the time separators”. Personally, I use both. At this point, just humor me and set your clock to show the seconds and the time separators, which will blink once a second.
A Brief History of Time
Long ago, before OS X, there was Apple OS 9 and earlier. OS 9 supported something called multi-threading. I can say the methods they used to support it were rather crafty, in the end though, less than ideal.
What this meant to a user was that you could do more than one thing at the same time. In real world use, multi-threading on OS 9 worked pretty good, but not perfectly. Using OS 9, you could forget about watching a movie while ripping an mp3. Some applications were written so poorly in this regard, just clicking and holding your mouse would freeze the entire system until you released the mouse.
Those days are long gone, but one of the side effects still remains. On OS 9, your clock would constantly lose time. Because the clock is an application of sorts, if another application got stuck in some way, the clock would get stuck. Over time, day-to-day use, you could lose a few minutes here and there. Not a big deal, because even OS 9 had the ability to reset the clock automatically by asking what the correct time is from a network time server.
Using a stalled clock to your advantage
While not nearly as often, nor as bad, OS X still suffers from the same stalling issues as OS 9. Certain applications can and will stall out your computer. Most of the time, it is for such a short period of time you will never notice. Further, the clock will again get auto reset to a network time server on a schedule.
A perfect example, one of my web servers, has been running for 134 days, in a logged out state; the clock is now 10 full minutes out of sync. Apparently network time servers are not polled on OS X when you are logged out.
Every now and then, my computer will lock up in some way. It could be a single application, or the entire system will freeze. Near all the time, I have mouse control, but I cannot seem to do anything else. Most of the time, I wait it out, and all returns to normal. It is just a badly written application that is stealing all the cycles from my computer, making it appear to be locked up.
And that is the key here, your machine only appears to be locked up, but you have no way of telling. Some of these stalls can last longer than I have patience. Most would reboot. Rebooting is bad because we all forget to save our data, and losing hours of work is no fun at all.
The trick here, if you can call it that, is to glance at your newly customized clock. If you see the seconds ticking by, or the time separator pulsing, more than likely, your machine is not locked up. Wait it out, and things should come back to normal.
If you look at your clock, and the seconds are not moving at all, your machine is locked up hard. You are, in 99% of the cases, going to need to reboot.
I know this seems rather trivial, but I have been using this tactic for years now. Mail.app is a known culprit, and will stall out for thirty seconds or more at times. I cannot switch from mail to another app, or force quit the application, as I am locked into this stall. I just look at the clock, notice the time is still ticking by, and know to at least wait it out.
It is sort of a last resort, but takes nothing more than a glance. At times, you may think your computer is frozen; the system clock is generally a very good indicator that your computer is still able to perform actions. The truth is any application that has constant animation to it is a good candidate to use as a tool like this. I find the system clock is always there, is one of Apple’s single most reliable system applications that provides, and has served me as a lock up detection tool for many years.
Scott-Many thx for your helpful site. I started following it even prior to buying my iMAC last week. I’ve made the clock change in hopes I will not have to cold boot ever again!
I am on dial-up and Safari seems to load even slower than my old 386. How do I determine my download speed in Safari? Your sage advice would be greatly appreciated. J.P.
That is a great technique~I’ve made the changes. I’ve had those freeze ups and wondered if it was an app or OS. Thank you!
Comment by JimB 04.16.08 @ 12:18 pm@jp, there are a few ways to determine download speed. One is to use a service, such as http://www.speedtest.net/ though at times, they can be inaccurate.
If you look at /Applications/Utilities/Activity Monitor, you can see there is a Network tab at the bottom, that will show you, in real time, the data in and out in Bytes.
Comment by Scott Haneda 04.16.08 @ 2:16 pm@Jim, thanks for the appreciation. This was a bit of a strange post, and I hoped people would understand what I was getting at. It is by no means a 100% perfect way to test a locked up machine, but for a quick glance method, it has served me well over the years.
Comment by Scott Haneda 04.16.08 @ 2:17 pmScott-Thanx for your prompt response re:Activity Monitor…I have tried to no avail – I get the monitor pane, but no activity on the network tab, even when loading web pages/mail. Perhaps dial up speeds are too low to register? A lengthy review of AppleHelp was not fruitful, and ;speedtest.net only measures broadbandspeeds (don’t I wish!)…Thx..J.P.
Comment by jp 04.17.08 @ 2:23 pm@jp,
I use http://www.speakeasy.net/speedtest/ for my tests-I generally will do it a couple times if I’m suspicious with the results. I do sympathize~it wasn’t that long ago I suffered dial-up, playing solitaire waiting for pages to load. Even the lowest dsl offering is a huge improvement
@jp, aside from installing a 3rd party network tool, which I am hesitant to recommend at this point, I can think of one other method.
Try downloading any file in Safari, makes little difference what, just try to have it be large. You can find a file at macupdate, or versiontracker, just any software should be fine.
Look at your Safari downloads manager window, that will also tell you the speed at which a file is being downloaded.
Comment by Scott Haneda 04.19.08 @ 9:20 amScott/Jim..Thanx to your efforts, I have determined my average dial-up speed on the new iMAC…The download manager idea did the trick….unfortunately, the test determined that ’speed’ as being 3Kb/Sec! This is with a new apple external modem and phone line.
One can only hope for future better service for outlying areas.
Thanx again for the sage and timely advice.
J.P.
Thanks for this. I have had problems with the beachball every now and again which is quite frustrating because I could not figure out what is wrong.
As it turns out, this happens when I have been networking between my iMac and MBP, close the lid on the MBP and try to work on the iMac. The iMac, when it discovers a broken connection, freezes while it tries to re-establish connection with the MBP. If I am quick I can wake the MBP from sleep and the connection is re-established.
Sometimes it has been a while between closing the MBP and resuming work on the iMac and I sit there wondering what is up. Now I will go look at the clock and see what is happening and maybe it will jog my memory that I broke the connection.
By the way, is there anywhere I can go to change the amount of time spent trying to re-establish contact? (I am running Tiger)
Comment by WetcoastBob 04.24.08 @ 9:17 am@WetcoastBob, you did not even need to tell me, I knew you were on 10.3 or 10.4
You are in a rough spot, Caroline’s laptop did this all the time as well. To my knowledge, and reading support articles on the matter, networking on older OS X’s is not so great when you leave a connection open.
The same happens to .mac users as well.
Unfortunately, the best I can tell you is to update to 10.5, where to date, I have not had an issue with this.
Sorry I can not be of more help.
Comment by Scott Haneda 04.24.08 @ 5:46 pmI will be updating when my present project is complete. (I don’t need the distraction at the moment)
Cheers
Bob
Thanks, Scott. This sounds like a great little tool. At least I’ll know if it is is isn’t locked! I was having locking issues last week because I clicked on the screen saver that uses the mosaic. It jammed twice so I gave it up. It was still “acting up” and luckily my guru reminded me to dump the preference file. It’s been fine for days now. But this little helpful technique of the flashing time separators and changing seconds (hey, I’m going with both *G*) will be very helpful.
Judie
Comment by Judie 04.26.08 @ 8:51 pm@jp Look into HughesNet. The only requirement is to have a clear view of the southern sky. Basic plan is 700kbps down and 128kbps up.
Comment by Jack 04.26.08 @ 11:21 pm@Judie, thanks for your comment. I do want to point out, this is just a small technique I have used in the past to give me a quick hint as to the state of my computer.
It worked much better on OS 9 since that OS was not nearly as resilient. The best point of this tip is that there are times when you think the machine is stuck, and you end up rebooting, and possibly losing unsaved data.
This will give you one last chance to see what is going on, and hopefully, allow you to wait it out. At least, give you the data you need to know if waiting it out is even a wise use of your time.
Comment by Scott Haneda 04.28.08 @ 7:14 pmVery helpful. I’ve done a number of reboots and wondered if I had waited if it would have worked itself out. Thanks!
Comment by Mike 05.11.08 @ 5:51 pmA wee question re. the display. On my old MBK I had the time/date menulette configured so that it read e.g Sat 24th May 2008 12:15. At the moment, the display simply reads Sat 12:15, and try as I might (in Open International), I can’t seem to re-create the display as I’d had it, for my new MBK.
Ideas?
btw, the site is FAB! Thank you.
actually – i remembered how, but here’s a good link that explains the process.
Comment by namchampa 05.26.08 @ 11:16 amhttp://paulstamatiou.com/2006/06/11/how-to-display-date-in-os-x-menu-bar
Comment by namchampa 05.26.08 @ 11:17 amWow, what a great site! Thanks for all those very helpful tipps! I came across your site when searching for infos about Mac OS X freezes that occur on my MacBook 2006 every then and when since I installed 10.5. Unfortunately, it seems that the whole OS freezes – most often when viewing flash videos in Firefox. Typical indication is that I can move the mouse but there is no reaction no matter what I click (even the finder’s system menu for “Force Quit” does not work anymore). Interesting to see that others also have problems with freezes.
Comment by Stefan 01.07.10 @ 10:49 pm@Stefan, I would suggest you keep Acticity Monitor open in the bacjground, and set it to show you the highest use CPU application sorted to the top.
Next time a freeze happens, look at that window, and see what is stuck, it should be neat the top, and sucking most of your CPU usage along with it.
Flash is quite literally, the largest cause of all crashes on Mac OS X. I would suggest you update FireFox to the most current version, uninstall Flash, and then reinstall the latest version.
Comment by Scott Haneda 01.08.10 @ 12:08 pm@Scott, thanks for your suggestion, will do so. Had a ssh conn open running top(1). When the system freezes, first FF will become unresponsive and the “turning colored wheel” (don’t know its name in english) shows up. If I move the mouse on the desktop, it changes to normal cursor. Then, one to two seconds later, the turning wheel also shows up while being on the desktop. When I issue a ps(1) or any other command then in the ssh-window, all I get is “cmd: cannot execute [Device not configured]“. After reboot everything works again, except that FF sometimes (not always) lost the tabs which were open before. So meanwhile I suspect the disk as the cause for those freezes, but need to be verified first.
Anyway, will try the tip with the activation monitor. Again, thanks very much for your help.
Comment by Stefan 01.08.10 @ 12:21 pm@Stefan,
If you had an open ssh connection, running top, then you need not bother with the Activity Monitor. Are you sure you had an ssh connection open, or do you just mean you had a shell open on that machine?
An ssh connection means you connected to the machine remotely, from another machine. I suspect you just opened terminal on the same machine, though I could be wrong.
I would try running `top -u` which will sort top by CPU usage.
Is “cmd: cannot execute [Device not configured]” the exact string you get from the shell?
* The spinning colored wheel is often called the Beach ball of death, or the spinning wheel of death. I think technically it is called the “Spinning Wait Cursor”.
I am not sure what your issue is, it could be a drive about to fail, have you looked at /var/log/system ?
What you may want to do, open a second terminal connection/window and run tail -f /var/log/system.log as a command. This will show you the system.log as it is being written to.
Whatch that log the next time things go downhill, and see what errors are generated. If anything good, paste them to pastie.org, and supply a link back here and I can if there is anything I can suggest.
Comment by Scott Haneda 01.09.10 @ 8:17 pm@Scott: Thanks again for your answer. Yes, I meant a ssh connection from the outside (I am an Unix old-timer
If the machine is about to crash (announced by the BBoD in Firefox) I have no more change to login remotely (ECONNREFUSED).
But if I do remote login before-hand, the shell then is still running and comments every try to execute a command with the above error message (literally).
Nothing found in any log file so far after such crashes. Today I had such a crash running Activity Monitor and shortly before freezing (the AM also freezed shortly after Firefox!) I saw that Firefox was not responding anymore. The BBoD apeared in FF, then in AM, then in the root window. Very mysterious.
Comment by Stefan 01.10.10 @ 3:21 pm@Stefan,
That’s a pretty deep crash if it is shutting down your remote ssh access. I have had machines having on by a bare thread and still able to get some things worked or repaired over ssh.
I would probbaly start by removing all plugins for FireFox, since that seems to be what causes this, and going from there. If that solves it, slowly add them back in, one at a time, until you find the bad one, and see if there is an update, or report it to the developer.
If it is not Flash and FireFox related, I am going to go with bad memory as a first guess, and bad hardware of some form if not that. You can use memtester in MacPorts, which I am the maintainer of, to help you check your memory. It will take over night. You will need to install MacPorts and the OS X Developer Tools, but if you are used to doing shell based things, you should be ok.
The raw portfile is here: http://trac.macports.org/browser/trunk/dports/sysutils/memtester/Portfile and you can download MacPorts from MacPorts.org
Comment by Scott Haneda 01.11.10 @ 6:31 pm@Scott: Thanks very much for all your help, very much appreciated. Will try memtest/replacement of disc first. Maybe FF is triggering something at the HW level, which causes the error (probably kind of the famous PDP-11 bug, which wasn’t recognized by DECs analysis software, but turned up regularily when using V7 Unix
). If I find out, I will report it. Thanks again!