|

Sunday February 27, 2005
Testing DB Interactions with DBD::Mock
Nice article over on perl.com demonstrating how to use DBD::Mock for testing Perl code that interacts with databases. Full article is here.
(2005-02-27 12:29:19.0)
Permalink

Friday February 25, 2005
From Russia, in English, with love...
With apologis to bmc for parapharsing his original post, one of the guys in my group, Gleb Reys, has just finished setting up a translation of his Solaris blog from Russian to English. Well worth adding to your list of Solaris blogs.
(2005-02-24 18:25:48.0)
Permalink

Sunday February 20, 2005
DTrace & finding C++ Memory Leaks
The developers.sun.com site has an excellent article written by Jay Danielsen on Using DTrace to Profile and Debug A C++ Program. Well worth ten minutes of your time.
(2005-02-20 14:19:33.0)
Permalink

Thursday February 17, 2005
Solaris 10 Certification Beta Exams
Beta exams for Solaris certification are now available, they will count towards full certification, if your a sys or network admin they could be worth taking a look at. Further details here. They appear to be free for the beta period.
(2005-02-16 20:06:48.0)
Permalink

Tuesday February 15, 2005
mdb core....
I ran into an interesting problem today, which unfortunately time (and a crash) didn't permit me to debug fully, but I'll share the mdb section of it with you anyway. I went to start up gvim on my desktop and it decided (well more accurately gnome decided) that it was having none of this, so a quick interrupt later I had a core dump. Anyway, I don't have dbx on my laptop at the moment, so time to fire up mdb...
> ::status
debugging core file of vim (32-bit) from dhcp-syd04-12-6
file: /export/home/fintanr/bin/vim
initial argv: gvim
threading model: multi-threaded
status: process terminated by SIGSEGV (Segmentation Fault)
So this isn't really telling me more than I killed off the process myself, now lets take a look at whats happening.
> ::walk thread | ::findstack
stack pointer for thread 1: 81c3098
[ 081c3098 libc.so.1`kill+0x15() ]
081c30a8 mch_exit+0x92()
081c30c8 getout+0x19c()
081c30e8 preserve_exit+0xaa()
081c30f8 0x811fc59()
081c310c libc.so.1`__sighndlr+0xf()
081c3164 libc.so.1`call_user_handler+0x22b()
081c3188 libc.so.1`sigacthandler+0xbb()
08046aa8 libICE.so.6`_IceRead+0x92()
08046ae0 libICE.so.6`IceProcessMessages+0x42()
08046c64 libICE.so.6`IceOpenConnection+0x2a4()
08046ce8 libSM.so.6`SmcOpenConnection+0xd6()
08046e38 xsmp_init+0xd4()
08046f58 main+0x15b0()
08046f80 _start+0x5d()
Hmmm, now a quick look around on google shows us that a similar type error occurs when gnome can't resolve a name after a network connection has been interrupted on Fedora core (see the bugzilla entry, so I start up gvim again and then used gcore(1M) to grab a core of my gnome-session, and takek a look at whats happening....
Loading modules: [ libc.so.1 libuutil.so.1 ld.so.1 ]
> ::status
debugging core file of gnome-session (32-bit) from dhcp-syd04-12-6
file: /usr/bin/gnome-session
initial argv: /usr/bin/gnome-session
threading model: multi-threaded
status: process core file generated with gcore(1)
> ::walk thread | ::findstack
stack pointer for thread 1: 8046ebc
[ 08046ebc libc.so.1`_waitid+0x15() ]
08046ed8 libc.so.1`waitpid+0x75()
08046f5c libgnomeui-2.so.0.600.1`libgnomeui_segv_handle+0xaf()
08046fb4 libc.so.1`call_user_handler+0x22b()
08046fd8 libc.so.1`sigacthandler+0xbb()
08047200 libICE.so.6`_IceWrite+0x84()
0804721c libICE.so.6`IceFlush+0x24()
08047244 libICE.so.6`IceAcceptConnection+0x168()
0810c368 accept_connection+0x25()
08127410 libglib-2.0.so.0.400.1`g_source_callback_funcs()
00000002 accept_connection()
>
And low and behold, yep, its a pretty similar bug. Unfortunately at this stage my gnome-session decided it had enough and died, but its a semi interesting one to look at. One to recreate when time is available and take a closer look with DTrace.
(2005-02-15 00:37:37.0)
Permalink

Friday February 04, 2005
Timeouts at 20 paces....
A quick bit of shell for checking if machines are alive..... I had to modify a script we use for running a benchmark yesterday to let us know if the client and database tiers had failed to come back up (there was a bit of re wiring work going on in the lab and we lost a rig without realising for a little while due to a disconnected cable). Anyway, a very simple piece of ksh was suffice, but just in case anyone needs something similar....
COUNT=0
SERVER_UP=0
function CheckServerUp {
SERVER=$1
COUNT_TIMEOUT=$2
while [ $SERVER_UP -eq 0 -a $COUNT -lt $COUNT_TIMEOUT ]
do
if [ `ping ${SERVER}| grep alive | wc -l` -eq 1 ]
then
SERVER_UP=1
echo "SERVER ${SERVER} is alive"
else
echo "Waiting on SERVER ${SERVER} to boot"
let COUNT=COUNT+1
sleep 60
fi
done
}
You just call it as
CheckServerUp yourServer no_of_times_to_try
i.e.
CheckServerUp myDB 20
And then just check against your SERVER_UP value to see if you need to do something.
(2005-02-03 22:31:07.0)
Permalink

Thursday February 03, 2005
Configuring JumpStart Servers to Provision Sun x86-64 Systems
I was planning on doing a blog posting on this at some stage, but thankfully (for me) there is no longer a need. Pierre Reynes has written an excellent Sun Blueprint on Configuring JumpStart Servers to Provision Sun x86-64 Systems. Well worth a read if you are using jumpstart with amd64 systems.
(2005-02-02 21:18:42.0)
Permalink

Tuesday February 01, 2005
Solaris 10 is out
Yep, the moment you have all been waiting for, Solaris 10 is here, go download and enjoy.
(2005-01-31 17:52:22.0)
Permalink
|