http://qs321.pair.com?node_id=790257
Order Automating System Administration with Perl

Item Description: Solving problems with a wide variety of Perl modules (as of 2009) by an expert guide to CPAN; focused on multiplatform system admin tasks, and applicable to many other areas.

Review Synopsis: Highly recommended for System Admins and Perl hackers in general.

Automating System Administration with Perl,
Tools to Make You More Efficient.
Second Edition

By David N. Blank-Edelman

Published May, 2009 by O'Reilly.
ISBN 978-0-596-00639-6
639 pages.
US $39.99
Cover: Sea otter.

Links:

ISBN 9780596006396

Publisher's product page.

Perl for System Administration
Review of first edition at perlmonks.

The first edition (published in 2000) was titled
Perl for System Administration,
Managing Multiplatform Environments with Perl.

The second edition has 50% more pages, four more chapters, and two more appendices.

Table of Contents

  1. Introduction
  2. Filesystems
  3. User Accounts
  4. User Activity
  5. TCP/IP Name and Configuration Services
  6. Working with Configuration Files
  7. SQL Database Administration
  8. Email
  9. Directory Services
  10. Log Files
  11. Security
  12. SNMP
  13. Network Mapping and Monitoring
  14. Experiential Learning
Seven tutorial appendices cover these topics:
  1. XML
  2. XPath
  3. LDAP
  4. SQL
  5. RCS
  6. VBScript-to-Perl
  7. SNMP

Code was tested by the author with Perl 5.8.8 and ActivePerl (5.8.8) 822.

Code was built with 'use strict', but that is not shown in samples.

This is a brief review, based on scanning through the book and reading two chapters and several other sections. I have used the first edition, and was pleased to find that it was revised and expanded to include more data about more modern Perl modules.

This book provides in-depth coverage of how to automate several aspects of SA work with Perl. At one level, it is a tour of a wide variety of CPAN modules for the busy SA, by a very experienced and knowledgeable guide.

The author provides much experience-based data concerning the problems being solved and various Perl modules and techniques that can be employed. The data in this book can help you to avoid expensive mistakes; or at least be prepared to handle such issues.

For example, the section on page 507 points out some benefits of using GD::Graph, and also a possible drawback, ie, it requires multiple levels of dependencies to be built and installed.

To avoid this issue, he offers several alternatives, such as
seeking a prebuilt package of GD::Graph for your system;
using a different package, (eg, one of the textual presentation tools described on the previous pages, like Text::Autoformat);
remote controlling some other dedicated graphing program (eg, gnuplot);
using the more powerful and complex RRD tool, described in the following section.

The author follows this paradigm throughout the book: describing a problem and a range of tools that can be used to solve it, and going into enough depth so that you can make an informed judgment about where to spend your time when faced with a similar problem:
search CPAN for data about these and other modules that could help;
or start with the tools and approach that he described in detail and apply them to your situation.

Another example: in Chapter 13, he chooses nemesis as a network packet builder. He mentions several alternative tools and also lists the reasons for his choice: the package has been well-maintained and has good multiplatform support. However, it relies on libnet 1.0.2, an older release that might not be on your system. You might have to handle this configuration problem before being able to use the tool. The note includes a link to a web page that covers the issue.

The end of each chapter contains a list of the Perl modules that were covered, and an annotated bibliography of relevant documents and web pages.

The seven appendices, are short tutorials with basic data about some of the technologies used in the book. These are valuable if you are new to the topic, or if you have not worked in that area recently.

There are many gems of insight throughout the book, especially in the highlighted sidebars, notes, warnings, and even footnotes, eg, "Friends don't let friends use Access as a multiuser database." p.75.

I only found one possible typo in my reading, and there was only one errata noted at the publisher's site for the book.

I can offer one suggestion: emphasize the valuable sidebars. They often give a flavor of the issues that you might face when working with the technology being described. Some of the sidebar titles are relevant, while others are not descriptive of the content. Rename the titles that need it, and list all the titles in the table of contents.

The author seems to enjoy writing, and he does it well. There is more than a little humor, which appears natural and not contrived. The technical content here is wide and deep, and is presented effectively.