View from the other side...

Date April 27, 2011

So, this whole "quitting my job" thing has definitely been an experience...I've got another month before the end, but I've got to say, it's really given me a change of perspective, and it's urging me to do things that I should have done a long time ago.

Automation is big for most sysadmins. We're inherently lazy, so the idea of pushing a button and making programs work for us? Appealing. I always wrote scripts to do things for me, but only since I told everyone that I was quitting did I really start to re-evaluate what I did by hand. As it turns out, there was plenty that I had been taking for granted, when I should have been scripting.

The first sign of this was probably back when I started to change the way I added tablespace in Oracle. (Our version and DB config of Oracle is terrible, so please skip over the particulars in the next couple of paragraphs and just go with the flow). Adding tablespace was scripted, but I was having to do it more and more often...until recently, when I wizened up, monitored usage, graphed it over time, then set up crontabs to add space for me. As it is right now, it's completely automated, which is the right way.

Then I realized that when the "maximum number of files exceeded" error popped up (around every 32 datafiles), I had to go through this big rigamarole which involved me manually turning off databases, syncing control files, etc etc. So I sucked it up and spent an entire day writing a script that can concretely do all of that for me.

Today I wrote a relatively brief script that iterates through users, adding clients' public keys to their keyrings, which I had been doing manually each time up to now.

There's no reason I couldn't (or shouldn't) have done these before, it's just that my perspective changed, and maybe more than anything, I was ashamed that I hadn't written the scripts, and I didn't want to have to explain that to the next admin.

Not automating things because you're lazy is the wrong kind of lazy.

A month or so of writing scripts and automating the boring stuff away is a month well spent.

  • Andrew

    Great post! I know some sysadmins that absolutely abhor scripting and will avoid it at all expense. The flip side is that it's very easy to spend too much time on scripting. For example, a task that takes 5 minutes a week that is replaced with a script that took 20 hours requires ~1 year to be "paid off." You also need to consider how long the problem you are trying to script will exist.

  • Jeff

    I've heard of working as if your successor knows your address and has anger management issues. Similarly, you can work as if your successor is a part-time intern, and plan accordingly. I like that plan.

  • Pingback: The Geekery » System Administrators, Automation, and Laziness - The Geekery