Chapter 13. Automation


Automating our tasks is a special treat. In what other career can we program machines to do our jobs for us? Oh, if only it were that easy. Automating something takes time, but the payback can be enormous.

This chapter doesn't attempt to teach Perl, Python, Ruby, Unix shell, VBasic, or Kix32. Instead, this chapter is about why we automate, what to automate, and how to automate. I'll also include some shortcuts that have helped me through the years.

Automation has the obvious benefit of reducing work for you because the task becomes quicker to do orthrough Unix cron or Windows Schedulerhappens automatically without any intervention at all. An unexpected benefit is that an automated task is easier to delegate. Any task you can foist onto someone else is a special victory.

Is It Automated Enough?

Adam Moskowitz, a well-known SA, tells me that his litmus test for whether something is "automated enough" is that he can delegate the task to someone less skilled. For example, once, he automated his company's disk backups to the point that the company secretary was able to take over the daily tape-changing tasks. Each day, the system would send email to her and Adam with the status of the previous night's backup. Usually, the system would simply output instructions about which tapes to change. If there was a failure, she knew not to touch the system until Adam had fixed the problem. Over time, he was able to modify the software to handle more and more failure cases. Soon the system would go months without requiring his intervention.


In this chapter, I will use the terms script and program to mean different things. Script implies a short program, possibly only a few lines. A script is usually a BAT file, a few lines of Perl, or a small Unix shell file. I'll use the term program when I mean a longer program, one that requires more thought and planning. Programs are usually written with a more formal process that includes requirements gathering, development, and testing. Programs tend to be written in compiled languages like C++ and interpreted languages that are suited to large programs such as Perl, but this is not always the case. Perl programmers, for example, often refer to their code as a Perl script if it is small and a Perl Program if it is large.





Time Management for System Administrators
Time Management for System Administrators
ISBN: 0596007833
EAN: 2147483647
Year: 2003
Pages: 117

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net