Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Solaris

Validating SMF manifests with xmllint

solarisNov 15, 2006 1 min read

I recently created SMF manifests for a few services I support. When I ran svccfg to import one of the manifests, it spit out the following error indicating that it couldn't parse the document: Since the svccfg error message didn't provide the number line that was causing the problem, I decided to run xmllint to see where the problem was: It turns out that when I cut and pasted text into the new manifest, I left out a left bracket and the letter s. It's all about getting your lint on!

$ read more →

Capping a Solaris processes memory

solarisNov 14, 2006 3 min

Solaris 10 introduced numerous capabilities, including the ability to use memory caps to limit the amount of memory available to a project. Memory caps are configured through the project(4) facility, and use the rcap.max-rss resource control to limit the amount of memory that a project can consume. Memory caps are enforced by the rcapd daemon, which is a userland process that periodically checks process memory usage, and takes action when a process has exceeded it's alloted amount of memory. To use memory caps on a server or inside a zone, the rcapadm utility needs to be run with the "-E" (enable memory caps) option to enable memory caps: In addition to starting rcapd, the capadm utility will enable the SMF services to start rcapd when the system boots…

$ read more →

Fixing a broken Solaris zone

solarisvirtualizationOct 30, 2006 5 min

I applied the latest set of patches to my x86 Solaris 10 server this morning, and after the server was rebooted I noticed that my zones didn't start. When I ran the zoneadm utility with the "list" option, all of the zones were in the "installed" state (they should be in the running state since the autoboot variables was set to true): At first I thought the zones service might be in the maintenance state, but after reviewing the output from the svcs command, that theory turned out to be incorrect: Since the box contained several critical services, I decided to start the zones by hand and perform mostmortem analysis after the zones were back up and operational. When I ran zoneadm with the the "boot" option and the name of the zone to boot, I was greeted with the following error: Oh good grief! After reviewing my notes, I noticed that I had applied patch 122663-06 (a libezonecfg patch) as part of the patch bundle…

$ read more →

Debugging the ipfilter SMF service

solarisOct 28, 2006 2 min

I logged into one of my Solaris 10 hosts today to add some additional firewall rules, and noticed that the ipfilter service was in the maintenance state: This is odd, considering this was working the last time I had checked up on the server. When I dumped out the logfile mentioned in the service state listed above, I noticed that the shell script that starts ipfilter was bombing out at line 180: Since I didn't modify /lib/svc/method/ipfilter, I started to wonder why ipfilter all of a sudden quit working. The erorr message above indicated that there was an error in the script at line 180, which is a bit misleading considering the script only has 179 lines: To find the actual line that was causing the issue, I decided to change the shell in /lib/svc/method/ipfilter from /sbin/sh to /bin/bash ( As a side note -- I still don't quite understand why anyone would use /sbin/sh on Solaris hosts, considering zsh, tsch and bash are available. If the reason is because of dependencies, Sun should consider moving the shells folks actually use into one of the core packages!)…

$ read more →

Getting stack traces from Linux and Solaris processes

linuxsolarisOct 19, 2006 2 min

When an application is running, it is sometimes useful to see which stack frame the application is currently in. This is especially useful when debugging hung processes, since you can see which function the program is currently executing, and the code path taken to get to that point. Both Linux and Solaris provide utilities to capture live stack traces from processes. The Solaris tool to grab this information is called pstack…

$ read more →