Viewing Apache apxs compiler flags

If you have used apxs to build an Apache module, you may have wondered where apxs got the linker and compiler options since they are not embedded in the apxs Perl script? The linker and compiler flags are generated by the apr-config and apu-config scripts, which contain platform specific options that are assigned at Apache build time. These options can be viewed by running apr-config or apu-config with one or more options:

$ apr-config –cppflags –cflags
-DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations

The Apache build system is super interesting, and I love the fact that you can easily add modules to an existing Apache installation.

USENIX 2006 wrap up

I recently got back from the annual USENIX technical conference, and thought I would BLOG about my adventures while I was in Boston. The following is a day-by-day breakdown of the sessions and events I attended:

Day 1
The first day I arrived, I attended a presentation from Alex Russell titled “Ajax and Advanced Responsive Day Webapp Development.” Alex began his talk with an overview of Javascript, and then proceeded to talk about the pros and cons of the numerous AJAX toolkits. His talk was exciting, and it was interesting seeing how AJAX fits into the web development model

Day 2
On day 2, I attended the keynote “PlanetLab: Evolution vs. Intelligent Design in Planetary-Scale Infrastructure,” which I was hoping was a talk on deploying and managing large distributed systems. The talk was ok, but nothing special. After the talk let out, I listened to several researchers talk about enhancements to Xen. This was an interesting track, and I thought Optimizing Network Virtualization in Xen was a cool paper. I also got to attend a a Perl guru session and a storage performance workshop during day 2, and had fun chatting with folks at the FreeBSD BOF.

Day 3
I started day 3 with John Sellen’s “RRDTool: Logging and Graphing” guru session. I got a lot of John’s talk, and found that the information was directly applicable to my job. Next I attended Steve Bellovin’s “Permissive Action Links, Nuclear Weapons, and the History of Public Key Cryptography” talk. Steve is a great public speaker, and one of the top security reseearchers in the world. His talk was interesting, especially the techniques he used to gather information on nuclear technology. I attended two additional talks after Steves, but they were somewhat dull and not worth talking about.

Day 4
On day 4 I attended David Sklar’s “Learning PHP5.” This was an awesome talk, and brought me up to speed on how PHP5 works. David is an exceptional speaker, and he definitely knows PHP inside and out.

Once David’s talk let out, I hopped on a plane and zipped back home. I have to say that I was somewhat dissappointed with USENIX 2006. The BOFs where non-existent, attendance seemed to be down from past conferences, and the vendors where nowhere to be seen. In the future, I think I will stick with LISA.

Using IPMI to retrieve platform characteristics

Intelligent Platform Management Interface (IPMI) is an industry standard protocol used to monitor and manage various platform characteristics. This includes the ability to print FRU information, remotely control the power of the chassis, and read a variety of sensors built into the hardware platform. If you are running a Solaris host, you can use the ipmitool utility to access IPMI platform data on a local or remote host. The following example shows how to use ipmitool to print the overall status of a server that supports IPMI:

$ /usr/sfw/bin/ipmitool -v chassis status

--
BMC req.fn         : 0x0
BMC req.lun        : 0x0
BMC req.cmd        : 0x1
BMC req.datalength : 0x0
BMC req.data       : 
--
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : unknown
Last Power Event     :
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false

In addition to printing high level status information, you can use the “sensor” and “sdr” options to print the operational status of each components in a server:

$ /usr/sfw/bin/ipmitool sensor

ambienttemp      | 21.600     | degrees C  | ok    | na        | na        | na        | 34.800    | 40.200    | na
bulk.v12-0-s0    | 12.120     | Volts      | ok    | na        | 10.200    | na        | na        | 13.800    | na
bulk.v3_3-s0     | 3.360      | Volts      | ok    | na        | 3.000     | na        | na        | 3.600     | na
bulk.v3_3-s5     | 3.240      | Volts      | ok    | na        | 3.000     | na        | na        | 3.600     | na
bulk.v5-s0       | 5.040      | Volts      | ok    | na        | 4.500     | na        | na        | 5.520     | na
bulk.v5-s5       | 5.040      | Volts      | ok    | na        | 4.500     | na        | na        | 5.520     | na
cpu0.dietemp     | 34.800     | degrees C  | ok    | na        | na        | na        | 70.200    | 73.200    | na
cpu0.memtemp     | 25.800     | degrees C  | ok    | na        | na        | na        | 49.800    | 55.200    | na
cpu0.vcore-s0    | 1.560      | Volts      | ok    | na        | 0.720     | na        | na        | 1.680     | na
cpu0.vldt2       | 1.200      | Volts      | ok    | na        | 1.080     | na        | na        | 1.320     | na
cpu1.dietemp     | 39.600     | degrees C  | ok    | na        | na        | na        | 70.200    | 73.200    | na
cpu1.memtemp     | 28.800     | degrees C  | ok    | na        | na        | na        | 55.200    | 60.000    | na
cpu1.vcore-s0    | 1.560      | Volts      | ok    | na        | 0.720     | na        | na        | 1.680     | na
fan1.tach        | 10440.000  | RPM        | ok    | na        | 1980.000  | na        | na        | na        | na
fan2.tach        | 10500.000  | RPM        | ok    | na        | 1980.000  | na        | na        | na        | na
fan3.tach        | 10500.000  | RPM        | ok    | na        | 1980.000  | na        | na        | na        | na
fan4.tach        | 10620.000  | RPM        | ok    | na        | 1980.000  | na        | na        | na        | na
fan5.tach        | 10500.000  | RPM        | ok    | na        | 1980.000  | na        | na        | na        | na
fan6.tach        | 10740.000  | RPM        | ok    | na        | 1980.000  | na        | na        | na        | na
gbeth.temp       | 33.000     | degrees C  | ok    | na        | na        | na        | 55.200    | 60.000    | na
hddbp.temp       | 24.600     | degrees C  | ok    | na        | na        | na        | 55.200    | 60.000    | na
sp.temp          | 33.000     | degrees C  | ok    | na        | na        | na        | 55.200    | 60.000    | na
cpu0.mem0        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
cpu0.mem1        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
cpu0.mem2        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
cpu0.mem3        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
cpu1.mem0        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
cpu1.mem1        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
cpu1.mem2        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
cpu1.mem3        | na         | discrete   | na    | na        | na        | na        | na        | na        | na
Event Logging    | 0x0        | discrete   | 0x0000| na        | na        | na        | na        | na        | na

$ /usr/sfw/bin/ipmitool sdr list all

NWS BMC          | Dynamic MC @ 20h  | ok
ambienttemp      | 20.40 degrees C   | ok
bulk.v12-0-s0    | 12.06 Volts       | ok
bulk.v3_3-s0     | 3.36 Volts        | ok
bulk.v3_3-s5     | 3.24 Volts        | ok
bulk.v5-s0       | 5.04 Volts        | ok
bulk.v5-s5       | 5.04 Volts        | ok
cpu0.dietemp     | 36.60 degrees C   | ok
cpu0.memtemp     | 25.20 degrees C   | ok
cpu0.vcore-s0    | 1.56 Volts        | ok
cpu0.vldt2       | 1.20 Volts        | ok
cpu1.dietemp     | 39 degrees C      | ok
cpu1.memtemp     | 28.80 degrees C   | ok
cpu1.vcore-s0    | 1.56 Volts        | ok
fan1.tach        | 10500 RPM         | ok
fan2.tach        | 10500 RPM         | ok
fan3.tach        | 10500 RPM         | ok
fan4.tach        | 10560 RPM         | ok
fan5.tach        | 10440 RPM         | ok
fan6.tach        | 10740 RPM         | ok
gbeth.temp       | 33 degrees C      | ok
hddbp.temp       | 24.60 degrees C   | ok
sp.temp          | 33 degrees C      | ok
cpu0.mem0        | Not Readable      | ns
[ ..... ]

ipmitool can also be used to print the FRUs in a server:

$ /usr/sfw/bin/ipmitool fru

FRU Device Description : Builtin FRU Device (ID 0)
 Chassis Type          : Rack Mount Chassis
 Chassis Part Number   : 602-2844-01
 Chassis Serial        : XG051642013
 Board Mfg             : S-SCI448
 Board Product         : NWSBIDff
 Board Serial          : M0250F25
 Board Part Number     : S02035
 Product Manufacturer  : Sun Microsystems
 Product Name          : Sun Fire(tm) V20z
 Product Part Number   : 602-2844-01
 Product Version       : A03
 Product Serial        : XG051642013

FRU Device Description : cpu0.mem0.vpd (ID 1)
 Board Mfg             : 2cffffffffffffff
 Board Product         : 1GB DDR333 (PC2700) ECC
 Board Serial          : 56dabeea
 Board Part Number     : 18VDDF12872G-335D3
 Product Manufacturer  : 2cffffffffffffff
 Product Name          : 1GB DDR333 (PC2700) ECC
 Product Part Number   : 18VDDF12872G-335D3
 Product Version       : 0300
 Product Serial        : 56dabeea

[ ..... ]

There are tons of other useful features, which you can read about in the ipmitool(1m) manual page.

Interesting article on dreaming

While scouring my list of news sources, I came across an interesting article on dreaming. The article has some awesome stuff, but my favorite tidbit of information relates to sleep deprivation:

“Experiments that have been conducted by various psychologists, who have in their time worked in the field of ‘Sleep deprivation,’ have shown that subjects who have been exposed to long periods of uninterrupted consciousness appear to become increasingly paranoid.

One possible explanation for this paranoia could be severe interference of clear thinking in an individual. This interference may result from the vast amount of information, which is just hanging around in such a person’s conscious mind, awaiting categorisation and eventual storage.

Another symptom of prolonged periods of sleep deprivation is a tendency towards hallucination. Again this appears to be the result of the unsorted information in the individual’s mind, interfering with their ability to think clearly.”

This helps explain why I see smurfs after my late night change windows. ;)