Archive
Posts from 2006
Creating a Linux ramdisk
While performing some testing a few weeks ago, I needed to create a ramdisk on one of my redhat AS 4.0 servers. I knew Solaris supported tmpfs, and after a bit of googling was surprised to find that Linux supported the tmpfs pseudo-file system as well. To create a ramdisk on a Linux host, you first need to find a suitable place to mount the tmpfs file system. For my tests, I used mkdir to create a directory valled /var/ramdisk: Once the mount point is identified, you can use the mount command to mount a tmpfs file system on top of that mount point: Now each time you access /var/ramdisk, your reads and writes will be coming directly from memory…
$ read more →Rebuilding the RPM database indexes
The RPM indexes on one of my CentOS 4.4 machines got corrupted last weekend, which caused some issues on one of the servers I was trying to update. To fix this issue, I removed the files with two underscores in /var/lib/rpm: And then I recreated the indexes by running rpm with the "--rebuild" option: This experience taught me a few things: 1. The package header information is stored in /var/lib/rpm/Packages 2. RPM has an "--initdb" option to initialize the RPM database 3…
$ read more →Monitoring logfiles with logsentry
I manage a fair number of servers, and use several tools to monitor the health of my systems. One such tool is logsentry (formerly known as logcheck), which is a shell script that can be used to monitor logfiles for anomalies. Logsentry consists of a single shell script and one or more violation files, and installing it as simple as extracting the package and modifying the paths in the shell script. If your using OpenBSD, you can use the pkg_add utility to add the logsenty package to your system: After logsentry is installed, you can add a cron job to enable it…
$ read more →Monitoring connections on OpenBSD hosts
I received a comment from a reader regarding the trafshow utility. Trafshow is definitely a cool piece of software, and I use it one some of my Linux hosts. On my OpenBSD systems, I have been using the pktstat utility, which provides connection statistics for all traffic on the system: Since trafshow contains numerous features that aren't present in pktstat, I reckon I should upgrade my OpenBSD image to use trafshow. Thanks for the comment!
$ read more →Using jumbo frames with Fujitsu gigabit Ethernet adaptors
While performing some testing a few weeks back, I needed to enable jumbo frames on one of our Fujitsu 250s. This was accomplished with the following three steps: 1. Add the following line to /etc/system: $ 2. If the default 9000 byte MTU isn't ideal, add the preferred MTU to the /etc/fjmtu.fjgiX file $ 3…
$ read more →