Filed under Data and Technology

Using MacPorts Subversion With BBEdit

PROTIP: If you want to use the Subversion features in BBedit, and you also like using v1.7+ of svn, you have to change the default location. Obviously this assumes that you have MacPorts installed and have used it to build and install the Subversion port. PLAIN TEXT CODE: defaults write com.barebones.bbedit Subversion:SubversionToolPathOverride /opt/local/bin/svn People who looked at this item also looked at... About How to Enable SSL for CSWapache2 How to Replace a Failed Drive in a ZFS Pool Toyota Yaris Review Why Did my Arm Fall Asleep? Related items Managing WordPress and Gallery2 With Subversion How to Replace a Failed Drive in a ZFS [...]

Tagged , , ,

How to Replace a Failed Drive in a ZFS Pool

So you have a failed disk in a ZFS pool and you want to fix it? Routine disk failures are really a non-event with ZFS because the volume management makes replacing them so dang easy. In many cases, unlike hardware RAID or older volume management solutions, the replacement disk doesn't even need to be exactly the same as the original. So let's get started replacing our failed disk. These instructions will be for a Solaris 10 system, so a few of the particulars related to unconfiguring the disk and device paths will vary with different flavors of UNIX. First, take a look at the zpools [...]

Tagged , , , , , , , , ,

How to Enable SSL for CSWapache2

If you're running the OpenCSW Apache package, it installs a Service Manifest into the SMF, so you'll have to edit this if you want to run Apache SSL... Here's how:

Tagged , , , , , , , , ,

ZoneType.sh Version 2.0

We just started supporting Solaris 10 in our VMware cluster so I had to update my zone type script to detect if the OS is running there. I'm not sure how I feel about depending on the output of ptrdiag since the interface is labeled "unstable", but it works for now, and I really don't see Sun changing the first line of output where the system configuration is listed. Anyhow, when issued with the -v or --vmware flag, the script returns 0 if it's running on the cluster and 1 if it is not. Usage: # zonetype.sh -g or --global Return 0: The machine is [...]

Tagged , , , , , , , , , , , ,

WP Error: The data could not be converted to UTF-8

If you've just upgraded to WordPress 2.9 and you are now getting UTF 8 conversion errors on your dashboard, you'll need to take a look at WordPress Trac Ticket #11219. RSS Error: The data could not be converted to UTF-8 The bottom line is that you'll need to enable either iconv or mbstring in your PHP configuration. I'm using CoolStack on Solaris 10, so it was a simple matter of uncommenting the following lines from /opt/coolstack/php5/lib/php.ini and restarting apache. While you're at it, may as well uncomment ctype as well since the new image uploader needs it. Uncommnet the following lines in /opt/coolstack/php5/lib/php.ini. extension=iconv.so extension=mbstring.so [...]

Tagged , , , , , ,

UNIX – Find Files that Changed Within Time Window

Every so often us lowly UNIX admins find ourselves needing to search a file system for files that have been created or changed within a certain time window. In other words, those files that are newer than time "X", but not newer than time "Y". There are a number of ways to accomplish this, but my preferred method is to create two reference files to indicate the beginning and end of my window and use the "-newer" and "! -newer" flags to search for files that changed within that window. # touch -amt 200910260000 /tmp/starttime # touch -amt 200910262359 /tmp/endtime # find / -type f [...]

Tagged , , , ,

Arduino Resources for the n00b

Lately I've been entertaining myself by building a rebreather loop controller using the Arduino micro controller. This little open source board is really nice to work with for a number of reasons. Unlike many of the alternatives which employ proprietary programming languages, the Arduino simply uses "C". It also has an IDE that runs the my Mac, and it enjoys an enormous development community. I'm pretty new to this kind of thing, so I've been using web tutorials to work my way up from the most basic blinking LED to something that actually monitors oxygen sensors and populates an LCD with information. Some of the [...]

Useful MySQL Commands

There are a lot of usefully MySQL commands that I either don't run enough to remember or just end up using some GUI to accomplish. Nothing against Navicat, but what kind of sysadmin would I be if I couldn't do it at the command line as well. Anyhow, I had to do a bunch of this kind of work lately, so I thought I would write the more common commands down here so I would have them to reference. It is generally a good idea to firewall off your MySQL port (3306) unless you are on a secure network. The downside to this is that [...]

Tagged , , , , , , , , , ,

Script to Determine Solaris 10 Zone Type

We use a lot of local zones in our Solaris 10 environment. We also use cfengine pretty heavily and there are some instances when we need to include or exclude certain automated tasks based on what type of zone we are working with. I wrote this little script that checks to see what type of zone we are dealing with. Based on the return value, I can set a cfengine class and control what gets run and where. Return 0 if the machine is a global zone with 1 or more local zones Return 1 if the machine is either a local zone or a [...]

Tagged , , , , , ,

Check Speed / Duplex on Solaris 10

In the past, I always had to use the ndd - get command to figure out what my link speed and duplex settings were. In Solaris 10, Sun now gives us the handy dladm command, which makes it a whole lot easier. # dladm show-dev e1000g2 link: up speed: 1000 Mbps duplex: full e1000g3 link: up speed: 1000 Mbps duplex: full e1000g0 link: up speed: 1000 Mbps duplex: full e1000g1 link: up speed: 1000 Mbps duplex: full People who looked at this item also looked at... Forcing Sun Network Interfaces to 100/Full Duplex Issues forcing Speed / Duplex on ”ce” and ”bge” Ethernet cards IFCONFIG [...]

Tagged , , , , ,

Replace Failed SVM Mirror Drive

So you have used SVM to mirror your disk, and one of the two drives fails. Aren't you glad you mirrored them! You don't have to do a restore from tape, but you are going have to replace the failed drive. Many modern RAID arrays just require you to take out the bad drive and plug in the new one, while everything else is taken care of automatically. It's not quite that easy on a Sun server, but it's really just a few simple steps. I just had to do this, so I thought I would write down the procedure here. Basically, the process boils [...]

Tagged , , , , , , , ,

Happy 1234567890′th Second UNIX!

Today, Friday February 13, at 3:31 PM (PST), the UNIX time will read exactly 1234567890. So exacly what is all this excitement about UNIX being able to count to 10? Surely, the operating system that is slowly but steadily putting Microsoft out of business must be able to do that. Well, it's actually the UNIX time stamp, and what has all of us nerds talking is really just the fact that the numbers have never lined up in sequence like this before. So what the heck is this UNIX time anyhow? Well, simply put, it's actually the exact number of seconds since the the Unix [...]

Tagged , , , , , ,