Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Solaris

Patching PHP on Solaris hosts (all patch utilities are not created equal!)

solarisOct 12, 2006 2 min read

While attempting to use the default Solaris patch command to apply the suhosin patch to the PHP source code, the patch command bombed out: The unified diff contained the name of each file to patch, so I decided to see if the GNU patch utility (which is installed in /bin on most Solaris hosts) worked: GNU patch worked flawlessly, which leads me to wonder if the Solaris patch command requires additional flags to process unified diffs similar to this. I have had a number of issues arise with the default Solaris patch utility over the years, and for some reason it doesn't seem to process unified diffs as smoothly as the GNU patch utility. In the interm, I aliased patch to gpatch to avoid these types of issues. :)

$ read more →

Solaris nscd keep-hot-count issue

solarisSep 30, 2006 2 min

While reviewing the DNS logfiles on one of my name servers, I noticed that one of my Solaris hosts was querying getupdates.sun.com once per hour: Since I had recently applied the latest connection manager patches to the server, I started to wonder if Sun had installed a cron job (or started a daemon) to periodically poll the server that hosted getupdates.sun.com. To see what process was querying getupdates.sun.com, I first reviewed the cron jobs on the system, and then I perused the list of daemons that were running. Everything checked out fine, so I fired up DTrace to see which process was actually responsible for the DNS requests. It turns out these DNS queries were coming from the nscd daemon…

$ read more →

Mapping pfiles output to files

solarisSep 22, 2006 2 min

While I was analyzing the performance characteristics of one of my Solaris 9 Oracle database servers, I needed to map a file descriptor listed in the pfiles output to the actual file name on the file system (Solaris 10 provides this information in the pfiles output, which is yet another reason to run Solaris 10). When you run pfiles on a process or core file, it gives you the type (e.g., socket, fifo, regular file, etc) of file that the file descriptor references, and the inode number associated with the file: To map the inode listed after the "ino:" field to the file name, I first used the "dev:" identifier to locate the device the file was located on: Once I had the device name and associated mount point, I used the trusty old find utility to locate the file by it's inode number: Some folks might be wondering why I didn't use lsof. Well, unfortunately the version of lsof available in various package repositories isn't able to interpret the VxFS metadata, and I would have spent more time building the new package than analayzing the problem I was trying to solve. Viva la Solaris!

$ read more →

Retrieving sysconf(), pathconf() and confstr() values from the command line

solarisSep 4, 2006 1 min

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 →

Generating E-mail when Solaris security patches are available

solarisAug 9, 2006 1 min

I wrote about pca a few weeks back, and absolutely love the capabilities it brings to the table. To keep my servers up date with the latest security patches, I added the following cron job to extract security patches from the pca output, and E-mail them to my account: This works pretty well, and I now get E-mailed when security patches are available.

$ read more →