Very descriptive non-descriptive error messages
A quick lesson I just re-learned... "just because it says it will do what it says it does on the tin, doesn't mean it's the only thing that the contents of the tin can be used for" or some such...
...this had me confused for a couple of hours: there I was about to install Solaris 10 on to an Ultra 5, when up comes the following error at the OBP:
"fast data access mmu miss"
Ahah! - "that sounds like a nice descriptive error message, something a quick search on Google will help me resolve" thought I. How wrong I was. Apparently this error can be because:
- the CPU is blown;
- the RAM is corrupt;
- something's amiss with the IDE bus;
- something's amiss with the SCSI bus;
- something's amiss with the PCI bus;
- something else is amiss..;
- the installed OS or some other software is somehow corrupt;
- the CD media can not correctly be read.
Now I can understand that the last two are essentially the same thing (corrupt media = corrupt software), but why have the same message for all of these options? I spent a good couple of hours testing the CPU, RAM and searching around to see if I could swap in replacements.
In the end all I had to do was re-burn the .iso images with a different burner (an external LaCie - bootiful bit 'o kit). Maybe I should have tried this first, but hey you live and learn;)
What version of Solaris am I?
Ok so you're given a Sun Solaris box to test with. You find a bug, you want to raise it - but how do you know what version of Solaris, and what revision exactly is installed?
At the most basic level booting the machine will reveal if you are running Solaris 8, 9 or 10 via a splash screen. However here are some useful commands:
uname -a <-- shows a summary of the system, its name and hardware type, eg:
SunOS Naylor 5.10 Generic_118833-03 sun4u sparc SUNW,Sun-Blade-1000
cat /etc/release <-- shows the exact release of the system, eg:
Solaris 10 1/06 s10s_u1wos_19a SPARC
showrev <-- shows the revision of the hardware and software installed, eg:
Hostname: Naylor
Hostid: 831263df
Release: 5.10 <-- this is the SunOS release which these days corresponds to the Solaris release (.10 = Solaris 10)
Kernel architecture: sun4u
Application architecture: sparc <-- this could also say x86 if not using a SPARC-based box
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.10 Generic_118833-03
showrev -p <-- echos the list of patches applied to a system, which will be quite long.
Therefore:
showrev -p > system.txt
will output the system revision and patchlist to a file you can attach to bug reports if necessary.
Also try:
prtconf -v <-- Displays platform-dependent PROM or booting system version information.
prtconf -p <-- I like to think of this as a summary of the above (it's not quite that but it is easier to digest in a hurry)
If you've used Stop-A you can also:
show-devs <-- outputs the device tree.
PCA - the best patch tool for Solaris
Another quick tip for fellow Testers trying to get to grips with Sun Solaris.
Forget the various patch managers available from Sun (smpatch, Sun Update Connection etc) - from experience they are oft prone to failure for the most inexplicable reasons. Instead what I needed (and found) was a simple to install, simple to use patch manager in order that I can keep the Sun Solaris boxes in the Test Lab up and running:
www.par.univie.ac.at/solaris/pca/"Patch Check Advanced"
A simple "./pca.sh -i" once a day keeps the Sun boxes up to date. It really has made managing the Unix workstations and servers a lot easier in the lab.
Oh - the instructions mention you need wget. If it's not on your system you can get it from:
www.sunfreeware.com- Download the version of wget for your Solaris version (make sure you get the package and not the source) to your Sun box;
- then gunzip .gz;
- then su to root (or other user with permissions to add packages);
- then do "patchadd -d ".
Eh voila!
Solaris screen resolution
How to change the resolution of your sun box? How to change it remotely?/usr/sbin/m64config <-- changes the resolution of the PCX graphics card/usr/sbin/fbconfig <-- changes the resolution of an Elite m3 (likely m6 as well) graphics cardWARNING: Changing the screen mode to a non-supported setting COULD DAMAGE YOUR MONITOR! These instructions work for me but may not for you - use at your own risk!ExamplesShow me some help: m64config -help fbconf -helpOutput the current configuration and supported resolutions: m64config -prconf
This will immediately change the PCX graphics card to use the described resolution: m64config -res 1024x768x75 now nocheck noconfirmThis will immediately change the Elite graphics card to use the described resolution and colour bit depth: fbconfig -depth 24 -res 1152x900x66 now nocheck noconfirmFAQs - What do I do if my screen is corrupt after changing the display? - log out and back in or reboot;
- What do I do if I change my resolution to an unsupported value? - always use the -prconf switch to check the valid resolutions for your device, however see below for a neat get out of jail card:
Changing the resolution remotely
Just imagine... you are busy testing version 1.0 of ReallyExcellentApp and need to perform a test on a different screen resolution. You perform:
fbconfig -res 1600x1200x85
and *bzzzt* your monitor is just showing static. What can you do?
Well, assuming you need access to what's on-screen try the following remote recovery method:
- On a second computer open up a shell prompt and: ssh -l
- One you have established an ssh connection type: su
- Enter your password and now type: /usr/sbin/fbconfig -res 1024x768x75 now nocheck noconfirm
- This will set the resolution back to a displayable value.
- Breathe out *phew!* You can now recover your test data.
Setting the resolution remotely allows you greater control over client computers when configuring for automated tests.
Sun box for testers
I decided I needed to up my Sun Solaris knowledge (call me a geek if u will) for "potential testing purposes"...honest.
Anyway, if you are in the UK and are on the look out for a cheap but
fully functional Sun box to learn more about these computers take a
look at ebay and user ID tima441. I managed to pick up a fully
functioning box for a very good price from Tim:
Sun Ultra 10 440mhz SPARC-IIi
1024mb RAM (the faster 50ns variety)
9.1gb HDD
Elite3D m3 gfx
Do go say hi - he seems to be a great chap; very helpful and sourced me just what I needed.
Now can someone explain why Sun keyboards have the Control and Caps Lock buttons swapped around?
Exporting your desktop to Mac OS X
I found this great article at sunmanagers.org that let me export my new Sun box's X-Windows desktop via Xsession to my iMac - yep the whole thing appears in real-time on the glorious 1440x900 display.
However it took some time to get working. My revised instructions are below:
- On the Mac open System Preferences | Sharing
- Check SSH to allow such packets through your firewall
- Load X11 on the Mac (Applications | Utilities | X11)
- Open two terminal windows from the Applications menu
- In window one enter in sequence, pressing enter at the end of each line:
bash
rm
/tmp/.X0-lock (I found Xquartz would fail to start if I did not remove this file first on each occasion)
y
export DISPLAY=:0.0/usr/X11R6/bin/Xquartz -xineramaWait till the following is shown:Screen 0 added: 1440x900 @ (0,0)
Screen 0 placed at X11 coordinate (0,0)Now in the second terminal window enter:bash
ssh -l [username] -X [ip] (eg: ssh -l jsmith -X 192.168.0.2)
[enter your password]
/usr/dt/bin/Xsession
The Solaris desktop should now open on your Mac - if this takes more than about 2 minutes (I typically find it takes ~30 seconds) then quit X11 and try again. If you are still stuck feel free to email me, colin[at]ethicalwebsites.com and I'll try to help.You will be logged into the desktop with the same user you specified in the ssh command, and have all associated permissions.This has been tested on Mac OS X 10.4.5 on PowerPC and Sun Solaris 10 on SPARC.
If you are a Test Engineer and reading this, this is a great way to save on all those messy KVMs to be able to access any *nix (Solaris, Unix, BSD, Linux...) box and get a nice GUI to play with:)
Sun Solaris for Testers
A series of blog entries describing how to perform various tasks on Sun Solaris.
These are written in a more conversational style than the average man page to aid those less familiar with the platform to be able to apply some useful techniques to solving every day problems.
All suggestions are provided AS IS. The reader accepts all liability for any mistakes in the instructions and code examples.
Please message me if you spot any errors!