Archive for April, 2005

Printing the contents of a static library

While debugging a static linking problem this weekend, I needed to see which files were included in a static library. This can be accomplished with the ar(1) utilities “-t” (print table of contents) option: $ ar -vt /usr/lib/libnsl.a | head 5 rw-rw-r– 0/ 1 1752 Aug 13 10:16 2004 common.o rw-rw-r– 0/ 1 4868 Aug […]

Siege web benchmarking utility

While I am waiting for Apache to build with the libtool –debug option, I thought I would share my thoughts on the siege utility. Siege is an open source HTTP regression and debugging utility. I have used curl and ab in the past to debug and benchmark websites, but prefer siege, since it allows me […]

Solaris B_FAILFAST messages

After patching my box a few months back, I noticed the following messages on the console after I rebooted: Apr 15 15:23:15 winnie md_mirror: [ID 437521] NOTICE: md: d1: B_FAILFAST I/O disabled Apr 15 15:23:15 winnie md_mirror: [ID 437521] NOTICE: md: d2: B_FAILFAST I/O disabled Apr 15 15:23:15 winnie md_mirror: [ID 437521] […]

C pre processor

I am knee deep in debugging another SEGFAULT issue, and was given a cool tip by my friend Clay this weekend. When you see lots of #ifdef, #ifndef, and #endif’s in a source file, you can see what the C pre-processor will produce by running the source through the C pre-processor command (cpp): $ cat […]

Solaris logfile rotation utilities

The logadm(1m) utility comes with the Solaris Operating System, and allows system and application logfiles to be rotated at configurable intervals. logadm(1m) is controlled through the logadm.conf configuration file, which contains the logfiles to rotate, and information to describe how to rotate the logfiles. When I need to add new entries to the logadm.conf configuration […]

Automating Solaris patch installations

Solaris 10 now ships with the patchpro suite of utilities, which assist with analyzing and applying Operating System patches. Patchpro makes patch installation super easy, since you are not required to download recommended bundles, or dig through patchdiag information to find the “required” patches. The patchpro smpatch(1m) utility can be run with the analyze option […]