Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in OpenBSD

Updating OpenBSD packages with pkg_add

openbsdJan 28, 2007 1 min read

One nifty feature that recently made it's way into OpenBSD is the ability to remotely update packages with the pkg_add utility. This is accomplished by adding the URL of a remote repository to the PKG_PATH variable, and then running pkg_add with the "-u" (update packages) and optional "-v" (verbose output) and "-i" (interactice installation) options: This is a super useful feature for busy admins, and will definitely make my life easier!

$ read more →

Checking swap usage on Solaris, Linux and OpenBSD hosts

linuxopenbsdsolarisJan 28, 2007 1 min

Each and every operating systemI support has a different utility to report on swap usage. On my Soalris hosts, I use the swap and vmstat utilities to check utilization: total: 36176k bytes allocated + 4672k reserved = 40848k used, 1189004k available On Linux hosts, I use the free and top utilities: total used free shared buffers cached Mem: 2055340 1427696 627644 0 179124 876300 -/+ buffers/cache: 372272 1683068 Swap: 1004052 0 1004052 And on my OpenBSD servers, I use the swapctl and systat utilities: Device 512-blocks Used Avail Capacity Priority swap_device 262068 0 262068 0% 0 Oh how I wish there was an administrator tool naming standard. :)

$ read more →

Debugging OpenBSD passwd problems

securityopenbsdJan 6, 2007 1 min

I recently had to manually add a few users to /etc/passwd and /etc/master.passwd on an OpenBSD 3.9 server. After I added the entries, the accounts were still unable to login. I started poking around with ktrace, and noticed that during a normal account creation session the files /etc/pwd.db and /etc/spwd.db were modified: -rw-r--r-- 1 root wheel 40960 Nov 23 05:38 /etc/pwd.db -rw-r----- 1 root _shadow 40960 Nov 23 05:38 /etc/spwd.db After seeing this, I went and read up on both of these files. It turns out that /etc/passwd and /etc/master.passwd get converted to database files by pwd_mkdb, and then the database files are used for actual authentication…

$ read more →

Monitoring logfiles with logsentry

openbsdNov 29, 2006 2 min

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 interface throughput on OpenBSD systems

openbsdNov 23, 2006 1 min

While persuing the OpenBSD ports collection a few weeks ago, I came across the ifstat utility. This nifty utility allows you to view bandwidth totals for each interface in a server, and at specific intervals. Here is a sample run showing the bandwidth in and out of the sis0 and sis1 Ethernet interfaces, and the total bandwidth in and out of the system: This is a nifty utility, and one I plan to add to my stock OpenBSD builds!

$ read more →