Buying Options
Python for Unix and Linux System Administration
Print $49.99
Add to Cart
Print+Ebook $54.99
Add to Cart
Ebook $39.99
(PDF)
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £38.50
Add to Cart
What is this?
Description
Python is an ideal language for solving problems, especially for Linux and Unix. With this pragmatic book, administrators can review various tasks that often occur in the management of these systems, and learn how Python can provide a more efficient way to handle them. Once you finish this book, you'll be able to develop your own set of command-line utilities with Python to tackle a wide range of problems.
Full Description
Table of Contents
  1. Chapter 1 Introduction

    1. Why Python?

    2. Motivation

    3. The Basics

    4. Executing Statements in Python

    5. Using Functions in Python

    6. Reusing Code with the Import Statement

  2. Chapter 2 IPython

    1. Installing IPython

    2. Basic Concepts

    3. Help with Magic Functions

    4. Unix Shell

    5. Information Gathering

    6. Automation and Shortcuts

    7. Summary

  3. Chapter 3 Text

    1. Python Built-ins and Modules

    2. Log Parsing

    3. ElementTree

    4. Summary

  4. Chapter 4 Documentation and Reporting

    1. Automated Information Gathering

    2. Manual Information Gathering

    3. Information Formatting

    4. Information Distribution

    5. Summary

  5. Chapter 5 Networking

    1. Network Clients

    2. Remote Procedure Call Facilities

    3. SSH

    4. Twisted

    5. Scapy

    6. Creating Scripts with Scapy

  6. Chapter 6 Data

    1. Introduction

    2. Using the OS Module to Interact with Data

    3. Copying, Moving, Renaming, and Deleting Data

    4. Working with Paths, Directories, and Files

    5. Comparing Data

    6. Merging Data

    7. Pattern Matching Files and Directories

    8. Wrapping Up rsync

    9. Metadata: Data About Data

    10. Archiving, Compressing, Imaging, and Restoring

    11. Using tarfile Module to Create TAR Archives

    12. Using a tarfile Module to Examine the Contents of TAR Files

  7. Chapter 7 SNMP

    1. Introduction

    2. Brief Introduction to SNMP

    3. IPython and Net-SNMP

    4. Discovering a Data Center

    5. Retrieving Multiple-Values with Net-SNMP

    6. Creating Hybrid SNMP Tools

    7. Extending Net-SNMP

    8. SNMP Device Control

    9. Enterprise SNMP Integration with Zenoss

  8. Chapter 8 OS Soup

    1. Introduction

    2. Cross-Platform Unix Programming in Python

    3. PyInotify

    4. OS X

    5. Red Hat Linux Systems Administration

    6. Ubuntu Administration

    7. Solaris Systems Administration

    8. Virtualization

    9. Cloud Computing

    10. Using Zenoss to Manage Windows Servers from Linux

  9. Chapter 9 Package Management

    1. Introduction

    2. Setuptools and Python Eggs

    3. Using easy_install

    4. easy_install Advanced Features

    5. Creating Eggs

    6. Entry Points and Console Scripts

    7. Registering a Package with the Python Package Index

    8. Distutils

    9. Buildout

    10. Using Buildout

    11. Developing with Buildout

    12. virtualenv

    13. EPM Package Manager

  10. Chapter 10 Processes and Concurrency

    1. Introduction

    2. Subprocess

    3. Using Supervisor to Manage Processes

    4. Using Screen to Manage Processes

    5. Threads in Python

    6. Processes

    7. Processing Module

    8. Scheduling Python Processes

    9. daemonizer

    10. Summary

  11. Chapter 11 Building GUIs

    1. GUI Building Theory

    2. Building a Simple PyGTK App

    3. Building an Apache Log Viewer Using PyGTK

    4. Building an Apache Log Viewer Using Curses

    5. Web Applications

    6. Django

    7. Conclusion

  12. Chapter 12 Data Persistence

    1. Simple Serialization

    2. Relational Serialization

    3. Summary

  13. Chapter 13 Command Line

    1. Introduction

    2. Basic Standard Input Usage

    3. Introduction to Optparse

    4. Simple Optparse Usage Patterns

    5. Unix Mashups: Integrating Shell Commands into Python Command-Line Tools

    6. Integrating Configuration Files

    7. Summary

  14. Chapter 14 Pragmatic Examples

    1. Managing DNS with Python

    2. Using LDAP with OpenLDAP, Active Directory, and More with Python

    3. Apache Log Reporting

    4. FTP Mirror

  1. Appendix Callbacks

  2. Colophon

View Full Table of Contents
Product Details
Title:
Python for Unix and Linux System Administration
By:
Noah Gift, Jeremy M. Jones
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
August 2008
Ebook Release:
June 2009
Pages:
464
Print ISBN:
978-0-596-51582-9
| ISBN 10:
0-596-51582-0
Ebook ISBN:
978-0-596-15878-1
| ISBN 10:
0-596-15878-5
Customer Reviews
About the Authors
  1. Noah Gift

    Noah Gift is the co-author of Python For Unix and Linux by O'Reilly. He is an author, speaker, consultant, and community leader, writing for publications such as IBM Developerworks, Red Hat Magazine, O'Reilly, and MacTech, and Manning.

    His consulting company is Giftcs, LLC and it provides solutions for Python Development and Systems Engineering. His personal website is www.noahgift.com. Noah is also the former organizer for PyAtl, which is the Python User Group for Atlanta, GA. He has given presentations at PyCon and PyAtl.

    He has a Master's degree in CIS from Cal State Los Angeles, B.S. in Nutritional Science from Cal Poly San Luis Obispo, is an Apple ACSA and LPI certified SysAdmin, as well as a Avid Certified Support Representative. He has worked at companies such as, Caltech, Disney Feature Animation, Sony Imageworks, and Turner Studios, and Weta Digital. You can see all of his film credits at IMBD.

    As a teenager he was a freelance television editor for ABC Network News. While at Caltech he worked for the Nobel Prize Winning President as a Mac Expert, and at Disney and Sony worked on the first feature animated films for both companies: Chicken Little, and Surf's Up, respectively. Recently he has worked on Python development projects as diverse as writing an SNMP auto-discovery system, writing a Content Management System from scratch, creating a large scale Web 2.0/Social Networking Application in Django for Turner Studios, to writing IPhone applications that talk to Google App Engine. He is also involved in a new media journalism project, Spotlight on FOSS, that had a kickoff interview of Mark Shuttleworth.

    He is currently co-authoring a book on Google App Engine and writing a large Google App Engine Exercise and Nutrition Tracking Application. Most recently, he works as a Python programmer for Weta Digital in New Zealand, which has one of the world's largest render farms/super computer sites.

    In his free time he enjoys spending time with his wife Leah, and their son Liam, and playing and composing piano music. He is also into exercising religiously, including running in and training for marathons, and blogging about it. When he gets a chance, he likes to write open source software. He is also interested in Artificial Intelligence research and software development.

    View Noah Gift's full profile page.

  2. Jeremy M. Jones

    Jeremy Jones is a software engineer/system administrator who works for Predictix. His weapon of choice is Python but he has done plenty of shell and Perl and a touch of Java.

    He is the author of the open source projects Munkware, a multiproducer/multiconsumer, transactional, and persistent queuing mechanism, ediplex, an EDI (Electronic Data Interchange) parsing engine, and podgrabber a podcast downloader. All three projects were written in the Python language.

    Jeremy spends his spare time enjoying his family and doing a little writing. He lives in Conyers, Georgia, just east of Atlanta, with his wife, Debra and his two children, Zane and Justus.

    View Jeremy M. Jones's full profile page.

Colophon

The image on the cover of Python for Unix and Linux System Administration is a boa constrictor (boa constrictor). Found throughout South and Central America and some islands in the Caribbean, boa constrictors are non-venomous snakes that can thrive in a wide array of environments, from deserts to open savannas and wet tropical forests, but they prefer arid terrain over wet surroundings. They are both terrestrial and arboreal, but as they get older, they tend to spend more time on the ground. Boa constrictors have very unique markings that include diamond- and oval-like patterns. Their scales change colors depending on their habitat, allowing them to hide from the forest-dwelling animals that hunt them. In the wild, boa constrictors thrive on small- to medium-size rodents, lizards, bats, birds, mongooses, squirrels, and have even been known to feast on other mammals as large as ocelots. Being cold-blooded and slow moving, boas can go up to a week without eating after capturing large prey. They are solitary and nocturnal hunters, with heat-sensitive pads on their heads to help them hunt. Particularly fond of bats, boas will hang in trees and from the mouths of caves waiting for them to fly by, then they can grab the bats with their mouths. Not surprisingly, boa constrictors kill by constriction. The snake wraps its body around its prey in coils, tightening its grip each time the victim breathes out, eventually suffocating it to death. Boas are a common attraction in zoos, and they are even relatively common pets. In fact, thousands of dollars are made every year importing them into the U.S. In South America, they are revered as "destroyers of rodents" and are often domesticated for that reason. Boa constrictors grow quite tame in captivity and can live there as such for 20-30 years. Hunted for the exotic pet trade and their decorative markings, some boa constrictors are endangered and have protected status. Boa constrictors are seasonal breeders. To attract males, females emit a scent from their cloacas, which is the chamber into which the intestinal and urogenital tracts discharge. Fertilization happens internally, and females can give birth to up to 60 live babies at one time. Significantly smaller than their anaconda cousins, newborn boas average 2 feet in length and can grow up to 13 feet long and weigh more than 100 pounds. Found in South America, the largest boa constrictor on record was 18 feet!

  • Book cover of Python for Unix and Linux System Administration