...making Linux just a little more fun!
By Dustin Puryear
|Title:||Perl for System Administration|
|Author:||David N Blank-Edelman|
|Publisher:||O'Reilly & Associates|
Perl is a great programming language. While not the most aesthetically pleasing or the most rigorously structured, the language is powerful, flexible, and very close to being ubiquitous in the networking world. And for system administrators Perl fulfills a very important need as a tool language: The ability to work, and to work well, under both Windows and UNIX.
There are a lot of useful things that you can do with Perl, including managing users, adjusting quotas, and monitoring log files and the Event Log. In Windows you can do much of this in Windows Scripting Host (WSH), and UNIX users have long had other tools to do these jobs. However, Perl is a major player these days in managing mid-size to large systems, and with Perl there comes a higher level of integration in managing disparate systems.
In 2000 O'Reilly & Associates published "Perl for System Administration," by David N Blank-Edelman. This book, despite having been published two years ago, is still an excellent resource for Windows and UNIX system administrators alike. Better yet, if you are managing a mixed environment, Blank-Edelman's book is even more valuable because of the emphasis on using Perl as a cross-platform tool to help manage UNIX, Windows, and even the Mac.
"Perl for System Administrators," weighing in at 418 pages, includes a very wide range of topics. The ten chapters, "Introduction," "Filesystems," "User Accounts," "User Activity," "TCP/IP Name Services," "Directory Services," "SQL Database Administration," "Electronic Mail," "Log Files," and "Security and Network Monitoring," form a solid foundation for building solutions across systems.
Now what is truly interesting about this book is the focus on supplying either cross-platform solutions, or if that doesn't directly apply, of ensuring that both Windows and UNIX needs are addressed in some depth for each given topic. For example, when discussing log monitoring in Chapter 9, "Log Files," Blank-Edelman discusses how to filter through both Windows Event Log and UNIX log entries. Using the information presented in this chapter you can begin to create a cross-platform log monitoring application for your own network.
Alas, the focus on the cross-platform aspects of Perl may be an issue for readers that want either a Windows- or UNIX- only focus. However, I would argue that it is this very lack of focus on either platform that brings "Perl for System Administration" to the next level. (If you are looking to learn how to use Perl under Windows then "Learning Perl on Win32 Systems," also by O'Reilly, would be a good choice.) Essentially, by the end of the book you will have learned to consider various administrative tasks at a higher-level so that you can address either Windows or UNIX systems with a cohesive solution, and in the end this kind of high-level design gives you a more robust and scalable solution.
As far as caveats, "Perl for System Administration" does require that you are an intermediate Perl user. The book is in no way an introduction to Perl, so be prepared to read an introductory text if you are new to Perl before reading this book. Also, I did find that some of the Perl modules mentioned in the book, and that you must install on your own systems, are difficult to find despite the pointers presented at the end of each chapter.
If you are responsible for managing more than a few servers or workstations then I suggest you check this book out. While you may not use all of the techniques and solutions presented in the book-for example, not everyone will have SQL servers to manage-there is more than enough information presented here to keep you thinking of your own custom Perl solutions far into the future.
Dustin Puryear, a respected authority on Windows
and UNIX systems, is founder and Principle Consultant of Puryear
Information Technology. In addition to consulting in the information
technology industry, Dustin is a conference speaker; has written
articles about numerous technology issues; and authored "Integrate
Linux Solutions into Your Windows Network," which focuses on
integrating Linux-based solutions in Windows environments.