Jump to content
urs

[perl] Automating System Administration with Perl

Recommended Posts

Posted

https://rapidshare.cc/getfile/code/86df737db1b384806061de21b243acaf

How This Book Is Structured Each chapter in this book addresses a different system administration domain and ends with a list of the Perl modules used in that chapter and references to facilitate deeper exploration of the information presented. The chapters are as follows: Chapter 1, Introduction This introductory chapter describes the material covered in the book in more detail, explaining how it will serve you and what you need to get the most from it. The material in this book is powerful and is meant to be used by powerful people (e.g., Unix superusers and Windows-based operating system administrators). The introduction provides some important guidelines to help you write more secure Perl programs. Chapter 2, Filesystems This chapter is about keeping multiplatform filesystems tidy and ensuring that they are used properly. We’ll start by looking at the salient differences between the native filesystems for each operating system. We’ll then explore the process of

xvi | Preface

Download at Boykma.Com

intelligently walking or traversing filesystems from Perl and how that can be useful. Finally, we’ll look at manipulating disk quotas from Perl. Chapter 3, User Accounts This chapter discusses how user accounts manifest themselves on two different operating systems, including what is stored for each user and how to manipulate the information from Perl. That leads into a discussion of a rudimentary account system written in Perl. In the process of building this system, we’ll examine the mechanisms necessary for recording accounts in a simple database, creating these accounts, and deleting them. Chapter 4, User Activity Chapter 4 explores ways to automate tasks centered around user activity, intro- ducing a number of ways to track and control process, file, and network operations initiated by users. This chapter also presents various operating system-specific frameworks and tools (e.g., Windows Management Instrumentation, GUI setup tools, lsof, etc.) that are helpful for user-oriented tasks on different platforms. Chapter 5, TCP/IP Name and Configuration Services Name and configuration services allow hosts on a TCP/IP network to communicate with each other amicably and to self-configure. This chapter takes a historical per- spective by starting with host files, then moving on to the Network Information Service (NIS) and finally to the glue of the Internet, the Domain Name Service (DNS). Each step of the way, it shows how Perl can make professional management of these services easier. We’ll also explore how to work with the Dynamic Host Configuration Protocol (DHCP) from Perl in this chapter. Chapter 6, Working with Configuration Files Almost every system or software package we touch relies heavily on configuration files to be useful in our environment. This chapter explores the tools that make writing and reading those files from Perl easy. We’ll look at various formats, with special attention paid to XML and the current best practices for working with it using Perl. Chapter 7, SQL Database Administration Over time, more uses for relational databases are being found in the system ad- ministration realm. As a result, system administrators need to become familiar with SQL database administration. This chapter explains DBI, the preeminent SQL database framework for Perl, and provides examples of it in action for database administration. Chapter 8, Email This chapter demonstrates how Perl can make better use of email as a system ad- ministration tool. After discussing sending via SMTP (including MIME-based HTML messages), receiving via POP3/IMAP, and parsing via Perl, we’ll explore several interesting applications, including tools for analyzing unsolicited commer- cial email (a.k.a. spam) and managing tech support emails.

Preface | xvii

Download at Boykma.Com

Chapter 9, Directory Services As the complexity of the information we deal with increases over time, so does the importance of the directory services we use to access that information. System administrators are increasingly being called upon not only to use these services, but also to build tools for their management. This chapter discusses some of the more popular directory service protocols/frameworks, such as LDAP and ADSI, and shows you how to work with them from Perl. Chapter 10, Log Files System administrators are often awash in a sea of log files. Every machine, operating system, and program can (and often does) log information. This chapter looks at the logging systems offered by Unix- and Windows-based operating systems and discusses approaches for analyzing logging information so it can work for you. Chapter 11, Security This chapter heads right into the maelstrom called “security,” demonstrating how Perl can make hosts and networks more secure. Chapter 12, SNMP This chapter is devoted to the Simple Network Management Protocol (SNMP). It illustrates how to use this protocol to communicate with network devices (both to poll and to receive trap information). Chapter 13, Network Mapping and Monitoring Perl offers some excellent tools for the mapping and monitoring of networks. In this chapter, we’ll look at several ways to discover the hosts on the network and the services they offer. We’ll then explore helpful graphical and textual ways to present the information collected, including some of the best tools for graphing and charting the data (such as GraphViz and RRDtool). Chapter 14, Experiential Learning This is the chapter you don’t want your boss to catch you reading. Appendixes Some of the chapters assume basic knowledge about topics with which you may not be familiar. For those who are new to these subjects, this book includes several mini-tutorials to bring you up to speed quickly. The appendixes provide introduc- tions to the eXtensible Markup Language (XML), the XML Path Language (XPath), the Lightweight Directory Access Protocol (LDAP), the Structured Query Lan- guage (SQL), the Revision Control System (RCS), translating VBScript to Perl, and SNMP.

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...