Archive
Posts from 2006
Retrieving sysconf(), pathconf() and confstr() values from the command line
On Linux and Solaris systems, the confstr() function and the sysconf() and pathconf() system calls can be used to programatically retrieve system, file and path limits. Periodically I need to view the value of a variable returned by sysconf(), pathconf() or confstr() from the command line. When these situations arise, I turn to the getconf utility. Getconf accepts a system variable name as an argument, and returns the value assigned to that variable: Getconf can also be invoked with the "-a" option to display all system and path variables along with their values: This is a useful utility, and is installed in /usr/bin on all the Linux and Solaris hosts I tested.
$ read more →Setting up the OpenBSD watchdog daemon (watchdogd)
The watchdog daemon (watchdogd) was introduced in OpenBSD 3.8, and can be used to help machines automatically recover from system hangs. If the OpenBSD hardware watchdog daemon is enabled, it will periodically update the hardware watchdog timer built into the system. If this timer is not reset for a period of time, the hardware will reset itself. The watchdog daemon is not enabled by default, and can be enabled (assuming OpenBSD can find a watchdog timer in your system) by adding a pair of empty quotes to the watchdog_flags variables in /etc/rc.conf: The update interval is controlled through the kern.watchdog.period variable, which can be set in /etc/sysctl.conf, and viewed with the sysctl(8) command: Using the hardware watchdog can be useful when you are running routers and access points in remote locations, and don't want to spend time driving to a remote location to reboot a hung system…
$ read more →Concert review Godsmack and Rob Zombie
On the last Metallica tour I got to see Godsmack open for James Hetfield and company. Prior to the concert, I had only heard a few Godsmack songs, and those were the tunes that got played excessively on the radio. Since I was there to see Metallica, I said what the heck, and decided to give Godsmack a shot at making my musical circle. The band did just that, and when they played the song "Voodoo," I knew immediately that I liked them…
$ read more →Setting the timezone on OpenBSD servers
I have performed a number of OpenBSD installations in the past, and have always used the installer to set the timezone. One system that I recently built didn't have a timezone set, which required me to run the zic(8) utility manually to change the timezone on the system. To set the servers timezone to Eastern with support for daylight savings time, I executed zic with the "-l" (Use the given time zone as local time) option and the timezone I wanted to use: Once the timezone was set, I used the rdate utility to synchronize the time on the server: If your not certain which timezone to use, you can check the directory /usr/share/zoneinfo. The zoneinfo directory contains the full list of timezones that can be passed to zic.
$ read more →Install OpenBSD packages to alternate directories
I run OpenBSD on a few Soekris 4801s. To get an image "prepped" for the Soekris, I use the directions on the Installing OpenBSD on Flash website. Periodically I need to apply patches to the images, which requires me to adjust the "make install" process to install the package to an alternative location. To apply a patch to a package and install it to an alternate location, I first apply the patch to the package that contains the errata: After the patch is applied, I use the build procedure outlined in the patch header to create the binaries and supporting infrastructure: Once the package is built, I use the DESTDIR variable to control where the package is installed: I poked around on google to see which variables are available to control the build process, but was unable to find a complete list…
$ read more →