A couple of times in the last few weeks, for different reasons, I’ve found myself explaining to people how to look at OpenSolaris crash dumps – usually because their machine has “weirdly rebooted, for no apparent reason”.

Actually, their machines had panicked, but they didn’t know it – they didn’t know what had gone wrong, and didn’t know about tools like mdb that can help them or others determine what had happened.

There’s many other observability tools in OpenSolaris, but a casual desktop user is unlikely to ever need them.

However, if you’re running unstable bits – perhaps a pre-alpha driver on your laptop, or are just plain unlucky, it’d be nice to get a helping hand. I thought that it could be useful to have something that would at least give a hint as to what the problem was. Here’s what I’m thinking of:



The above shows a simple script that checks for the existence of a file created by a hacked version of svc-dumpadm, the SMF method script for the dumpadm & savecore service. The method script simply checks the system crash directory before and after running savecore, and creates a text file containing a quick summary of the panic, assuming a core had been saved. I haven’t tested it exhaustively, but it seems to work okay – comments welcome.

On desktop login after a panic, a script would run that displays the dialogs above, asking the user if they want to upload the crashdump, or mail the text summary to someone who could help. Now, of course there are privacy issues here – crashdumps can contain sensitive information and normal users don’t have access to the dumps, so we would need to run in a privileged mode, and might want to limit which users on the system are allowed to run this script – but we have the technology

I haven’t yet written the desktop integration part of the above – haven’t had time to dig into how to add a script to every user’s desktop session on startup (is there a common way for both GNOME and CDE?) but does this seem like a sane idea otherwise?

True, it’s not Explorer, or CTEact, but for the casual OpenSolaris user (Indianaians?), something like this might be enough to help them get their problem diagnosed with a minimum of grief for all concerned. If you think this would be useful, let me know and I’ll have a go at finishing the scripts and post them here when I’m done, ample free time permitting.

ps. The above screenshot shows my laptop running a very old build of Nevada – sorry. In my defense, I have a much newer set of BFU archives installed on a separate zfs-bootadm environment, but just didn’t have them booted at the time I took that screenshot.

Advertisements