Linux Power Tools / Edition 1

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Paperback)
  • All (23) from $1.99   
  • New (9) from $26.39   
  • Used (14) from $1.99   


Step-by-Step Instructions Show You How to Supercharge Your Linux System
Wondering if it's possible to work more efficiently in the X Window System, or squeeze more oomph from your existing hardware? Or perhaps you're searching for a way to improve your web browser's performance, or want to know how to choose the best mail server for your needs. If you've mastered the basics and are itching to go beyond, Linux Power Tools can take you there. Spanning a broad range of topics (from ALSA to zombies), Linux Power Tools covers the top five Linux distributions (Debian, Mandrake, Red Hat, Slackware, and SuSE). Using his easy-to-follow style, Linux expert Rod Smith shares his secrets for creating the optimum Linux system, from top to bottom.
Coverage includes:
* Optimizing Hardware
* Creating the Perfect GUI Environment
* Using Digital Image Tools
* Fine-tuning the X Window System
* Doing Real Work in Text Mode
* Using Multiple Operating Systems
* Managing Packages Efficiently
* Optimizing Your Filesystem
* Improving Network Performance
* Preventing and Detecting Intrusions
* Getting the Most From Your Web Server
* Blocking That Obnoxious Spam Mail

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
OK, you’ve not only gotten Linux running, you can make your way around KDE or Gnome. Even the shell. You’re actually getting pretty good at it. Now you’re itching to go further. Roderick Smith has written Linux Power Tools for you. Whatever leading distro you prefer -- Debian, Mandrake, Red Hat, Slackware, or SuSE -- this book will help you make the most of it.

Why be satisfied with getting X Window System working, when you can tweak it for significantly better performance? Why be satisfied with your system’s existing disk performance, when a bit of repartitioning (or some filesystem tweaking) can make all the difference?

Why be satisfied with the way your bundled web browsers work, when you can enhance everything from their font display to their security?

Maybe you need better cross-platform compatibility? Maybe you’re confused about which Linux printing system to use -- BSD LPD, LPRng, or CUPS? Maybe you’re struggling with fonts (you sure won’t be the first Linux user with font problems).

These are just a few of the issues Linux Power Tools can help you with.

Not sure how to set up an incremental backup with tar? Configure your digital camera with gPhoto? Bypass your distro’s automatic con?gurations? Provide secure remote logins with SSH? Configure GRUB or LILO (but, umm, not Stitch)? It’s all here.

Some of this stuff can be tricky (for instance, resizing filesystems or using NTP time synchronization). No matter how hard or obscure the subject matter, though, Smith’s clarity and experience will carry you through. We’ve seen no faster route to Power Userville. Bill Camarda

Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks for Dummies, Second Edition.

Read More Show Less

Product Details

  • ISBN-13: 9780782142266
  • Publisher: Wiley
  • Publication date: 8/1/2003
  • Edition number: 1
  • Pages: 644
  • Product dimensions: 7.50 (w) x 9.25 (h) x 1.35 (d)

Meet the Author

Roderick W. Smith is an experienced Linux administrator and author or co-author of several other Linux books, including Linux System Administration, Linux Samba Server Administration, and Linux+ Study Guide.

Read More Show Less

Read an Excerpt

Linux Power Tools

By Roderick W. Smith

John Wiley & Sons

ISBN: 0-7821-4226-5

Chapter One

Optimizing System Architecture Usage

Although Linux is a software product, it depends heavily on the hardware upon which it runs-and Linux runs on a very wide range of hardware. For this reason, knowing how to get Linux working best with your computer's hardware is a critically important skill, which is why this book begins with several chapters on hardware. This chapter begins the examination with several hardware components that reside on the motherboard or on boards attached directly to it-the CPU, video hardware, and audio hardware. This chapter also describes how to get Linux to recognize hardware devices, including many covered in subsequent chapters. Finally, this chapter concludes with a look at the /proc filesystem, which is a window onto the hardware. Knowing how to use /proc can help you diagnose and fix hardware problems.

Getting the Most from Your CPU

The CPU is the heart of your computer. It executes your Linux programs, including the Linux kernel. Therefore, picking the right CPU is important when you buy a new computer or upgrade an existing one. Even if you're not planning to upgrade your system soon, you can take steps to improve Linux performance on your existing CPU. In some cases, setting incorrect optimizations can prevent a program from running; but usually, the wrong optimizations merely degrade performance slightly.

Understanding and Choosing CPUs

The Linux kernel was originally written for the Intel 80386 (or i386) CPU. This CPU is part of a family of CPUs known as the 80x86, x86, or Intel Architecture 32 (IA-32) family. These CPUs all have similar capabilities and run more-or-less the same programs, although there are exceptions to this rule. Other architectures are available, though, and Linux runs on many of them. If you're planning to buy a new computer, you may want to consider some of these alternatives to the ubiquitous IA-32 systems. First, I'll explain the architectures of the most popular desktop computer CPUs, followed by some tips on choosing the right CPU for your needs.

IA-32, IA-64, x86-64, PPC, and More

The most popular CPU architectures for desktop computers in 2003 are the following:

IA-32 These CPUs power the vast majority of computers sold from the late 1980s to the present. Intel, AMD, VIA, and Transmeta are selling IA-32 CPUs in 2003, and other companies have sold them in the past. The most popular IA-32 CPUs of late are Intel's Pentium 4, Intel's Celeron, AMD's Athlon, and AMD's Duron. The 32 in IA-32 refers to the fact that these CPUs have 32-bit data busses, meaning that they move data in 32-bit chunks. This 32-bit architecture has been adequate for over a decade, but increases in RAM capacity and new concepts in low-level CPU design make it desirable to retire this venerable CPU line. In 2003, both Intel and AMD are pushing new 64-bit CPUs. Time will tell how successful each is in this endeavor.

Note Linus Torvalds, the creator of the Linux kernel, now works for Transmeta. Therefore, the Linux kernel includes unusually good support for some Transmeta CPU features. These CPUs are uncommon in desktop systems, though; they're most popular in portable devices.

IA-64 Intel's 64-bit CPU architecture is known as IA-64, and it is being sold under the Itanium name. Itanium is a high-performance 64-bit architecture that's being targeted initially at the high-end workstation and server markets. As such, IA-64 systems tend to be expensive. The IA-64 CPU is capable of running IA-32 programs in a compatibility mode, but performance suffers greatly in this mode, and you can't run IA-64 and IA-32 programs at the same time. Aside from the IA-32 compatibility mode, the IA-64 was intended in part to discard much of the historical baggage that's accumulated with the IA-32 architecture over the years.

x86-64 AMD's 64-bit architecture goes by the name x86-64, with chips sold under the names Opteron and Athlon 64. As the name implies, x86-64 is a 64-bit derivative of the 32-bit x86 (IA-32) architecture. As such, it's a less drastic deviation from IA-32 than is IA-64, and performance when running IA-32 programs doesn't suffer greatly. It's also possible to run x86-64 and IA-32 programs side-by-side, which should make the transition from IA-32 to x86-64 relatively painless.

PowerPC This CPU (often called PPC) was developed jointly by Motorola, Apple, and IBM as a successor to Motorola's 680x0 CPU series, which were most commonly found in Apple Macintoshes from the 1980s and early 1990s. PPC CPUs are common in more modern Macintoshes, in some IBM workstations, and in a few less mainstream systems, such as the AmigaOne. The PowerPC was originally designed as a 32-bit architecture with little historical baggage, unlike the IA-32 and x86-64 CPUs. A 64-bit version is now available, as well.

Alpha The 64-bit Alpha CPU was originally developed by Digital Equipment Corporation (DEC), but DEC went out of business and Compaq bought much of DEC, including the rights to the Alpha CPU. With the merger of Compaq and Hewlett-Packard (HP) in 2002, the Alpha CPU now belongs to HP, but it appears that HP intends to let the design die. Alpha CPUs found their way into many high-performance workstations and servers, but they never became a viable competitor to IA-32 or PPC for most consumers.

MIPS The MIPS CPU line includes both 32- and 64-bit variants. These CPUs are most commonly found in embedded devices, such as dedicated routers, digital cable boxes, digital video recorders, and video game systems. Some of these devices run Linux; therefore, Linux and MIPS are closely related-but in ways that are not obvious to most people.

SPARC SPARC and UltraSPARC CPUs are used by Sun in its workstations, which usually run Solaris. Linux can also run on most Sun workstations, so if you want to use an UltraSPARC CPU for a Linux workstation or server, you can.

Choosing the Right CPU

For the most part, you must obtain software that's been compiled for a specific architecture in order to use software on that computer. For instance, to run Linux on an iMac, you need a PPC Linux distribution. The same applies to specific programs. For instance, if you want to run WordPerfect, you can only do so on the IA-32 architecture, because WordPerfect is a commercial program that's only been released for IA-32 systems. Most Linux software is available with source code, though, and so it can be readily recompiled for any CPU type. Therefore, in many ways, the CPU family you use doesn't matter; you can run common software such as Apache, sendmail, Mozilla, and KMail on any architecture.

One important consideration concerning Linux and different CPUs is the availability of Linux distributions for various CPU types. Table 1.1 summarizes the availability of some of the most popular Linux distributions on various CPUs. At the time of writing, x86-64 support is lacking, but it's likely to materialize in 2003. In most cases, the non-IA-32 versions of distributions lag behind their IA-32 counterparts by a version or two-for instance, Mandrake 9.0 for IA-32 versus 8.2 for PPC. Overall, if you want to run Linux on a non-IA-32 architecture, Debian is the safest choice, although there are other options for some CPUs.

CPUs differ in some performance details. In particular, the IA-32 architecture is notorious for poor floating-point math performance, which makes it a poor choice for certain types of scientific simulations, ray-tracing graphics, and other tools that perform heavy floating-point math computations. Details differ by specific CPU model, though. For most desktop and even server purposes, this limitation is unimportant.

CPU manufacturers often make a big deal of whether their CPUs use a traditional complex instruction set computer (CISC) design or a reduced instruction set computer (RISC) design. IA-32 and its derivatives use a CISC design, whereas PPC, Alpha, SPARC, and MIPS use RISC designs. (The IA-64 uses a mixed design.) CISC CPUs feature more complex instruction sets, and they require more clock cycles to execute a single instruction than do the simpler instructions in RISC architectures. Therefore, RISC CPUs can often do more at any given clock speed, as measured in megahertz (MHz), than can CISC CPUs-but other factors come into play, as well. For instance, some tasks require more operations to perform with a RISC CPU than with a CISC CPU.

Tip When comparing CPU speeds, you should examine benchmarks designed for this purpose, not the CPUs'speeds in megahertz. Even within a CPU family, design differences between models make directly comparing CPU speeds tricky at best.

One other CPU design factor deserves mention: endianness. This word refers to the way that data are stored within a single 32- or 64-bit word. Data are broken up into 8-bit bytes, which may be stored with the least significant bit (LSB) first (aka little-endian) or the most significant bit (MSB) first (aka big-endian). IA-32, its derivatives, and Alpha are little-endian architectures, but SPARC is big-endian, and PPC and MIPS can work in either mode. Which mode a CPU uses is unimportant in terms of performance, but this feature can sometimes have consequences if programs are written to assume one encoding method or another. For instance, if a program stores data files by dumping data structures directly to disk, those files may not be readable by the same program compiled on another architecture. Most programs are smart enough to detect this difference and compensate, but some (mostly little-known and specialized tools) aren't, so you should be aware of the problem.

Within-Family Differences

CPU design isn't static. Over the years, each architecture has spawned multiple CPU designs. New models frequently introduce new features, typically while maintaining compatibility with older designs. Therefore, old software can run on new CPUs, but to take full advantage of the new CPUs, software must be recompiled. This recompilation sometimes makes binaries incompatible with the older CPUs. The upcoming section, "Improving Performance with Compile-Time Options," describes some of the specifics of how to do this job.

Within the IA-32 family, there are several different general levels of performance, which are often referred to by numbers that relate to Intel's original naming convention for these CPUs. The lowestnumbered IA-32 CPU is the i386. (Earlier CPUs in this line, such as the i286, used 16-bit architectures. These CPUs are x86 CPUs but not IA-32 CPUs.) Intel, AMD, and Cyrix (now bought out by VIA) all produced i386 and i486 CPUs. With the next level, Intel began naming its CPUs, starting with the Pentium; therefore, this CPU is sometimes called the i586. AMD and Cyrix also produced i586-level CPUs, although their design details differed from the Pentium's.

Today, the best IA-32 CPUs are the Pentium 4 and the AMD Athlon, while Intel's Celeron and AMD's Duron occupy a slightly lower tier. Each of these CPUs is more than capable of running Linux. Because new CPU models emerge so quickly, your best bet for obtaining relative performance information is to check magazine reviews or online hardware sites, such as Tom's Hardware Guide (

Linux software packages (described in more detail in Chapter 11, "Managing Packages") often include an architecture code in their filenames. For IA-32 systems, this code is usually i386, but it may be i586, i686, or even something more specific, such as athlon. Installing a package with a code for a lower-grade CPU than you own isn't a problem, but installing a package intended for a higher-grade CPU or a specific CPU from another manufacturer may cause poor performance or program crashes. For instance, you shouldn't try to use an athlon package on a Pentium-class or Pentium 4 CPU.

Improving Performance with Compile-Time Options

If you compile your own software, you can pass options to the compiler to have it optimize the resulting source code for a specific CPU model. For instance, if you have an Athlon, you might compile your software with Athlon optimizations. For most programs, these optimizations will yield only trivial performance improvements, but for some programs, the benefits can be more important. These critical packages include the Linux kernel, common system libraries such as libc, any CPUintensive programs that your system runs frequently, and for workstations your X server and other core GUI tools. Most IA-32 distributions ship with i386 optimizations, which means the distributions work even on very old computers, but they may experience modest performance improvements if you recompile some of these critical components. Some distributions offer prebuilt kernel packages with CPU-specific optimizations, so you may want to use these kernels. Mandrake is unusual in that it builds everything with i586 optimizations, which provides a small performance boost.

If you want to compile your own software with optimizations, you need to pass the appropriate options to the compiler. The GNU Compiler Collection (GCC) supports two options for IA-32 CPU optimizations: -mcpu and -march. The former optimizes code for a specific CPU model, but it does so in a way that allows code to run on other CPU models. The latter option does more complete optimizations for a CPU in such a way that the code may not run on other (and particularly on older) CPUs. Both options take the name of a CPU as a parameter, as in -march=pentium4. Options are i386, i486, i586, i686, pentium, pentium-mmx, pentiumpro, pentium2, pentium3, pentium4, k6, k6- 2, k6-3, athlon, athlon-tbird, athlon-4, athlon-xp, and athlon-mp. The i586 option is equivalent to pentium, and i686 is equivalent to pentiumpro.

In order to use these options, you can either compile code directly using GCC (as in gcc -march=pentium4 myprog.c -o myprog) or edit the Makefile for a package. Typically, a Makefile includes a line in which various GCC flags are defined, such as this:

CFLAGS= -O2 -Wall -I/usr/X11R6/include

You should change this line to add the appropriate optimization, as in:

CLFAGS= -O2 -march=pentium4 -Wall -I/usr/X11R6/include

In some cases, a Makefile will already specify an optimization, in which case you can change that default. Some packages have configuration tools that enable you to specify an optimization. Consult the package's documentation for details. (The next section, "Setting Kernel Options," includes information on optimizing the Linux kernel.)

In addition to CPU-specific optimizations, it's possible to tell GCC to optimize code in less CPU-specific ways. These optimizations may increase compile time, reduce the reliability of the debugger, or increase program size. These optimizations are specified with the -O (that's an uppercase letter O) option, followed by a number from 0 to 3, as in -O2 in the preceding examples. Increasing numbers represent increasing optimizations for execution speed. In addition, the -Os option optimizes the code to reduce its size.

Note Most distributions today use Red Hat Package Manager (RPM) or Debian packages. (Slackware is a notable exception.) Rebuilding such software from source code packages may or may not optimize them for your CPU, depending upon the build scripts included in the source package. You may need to edit these scripts in order to rebuild a package with CPU-specific optimizations.

Setting Kernel Options

Because all Linux software runs atop the kernel, the kernel's performance, and hence its optimizations, is particularly important. What's more, the kernel's configuration tools enable you to set its optimizations from a menu. Figure 1.1 shows this menu, obtained by typing make xconfig in the kernel source directory, for a 2.5-series kernel.

The Processor Type and Features option area contains kernel settings related to the CPU type and related options. Other options include:

SMP Support Symmetric Multi-Processing (SMP) refers to a computer with multiple CPUs. The kernel requires special support to take advantage of more than one CPU per computer.

APIC Support The Advanced Programmable Interrupt Controller (APIC) is an interrupt controller built into some CPUs, as opposed to built into the motherboard chipset. Select this option if your CPU supports this feature.


Excerpted from Linux Power Tools by Roderick W. Smith Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

Introduction xxi

Part I Hardware Tools 1

Chapter 1 Optimizing System Architecture Usage 3

Chapter 2 Improving Disk Performance 29

Chapter 3 Using External Peripherals 55

Part II User Tools 77

Chapter 4 Mastering Shells and Shell Scripting 79

Chapter 5 Doing Real Work in Text Mode 97

Chapter 6 Getting the Most from a Desktop Environment 113

Chapter 7 Using Linux for Office Productivity 139

Chapter 8 Miscellaneous User Tools 155

Part III System Administration Tools 181

Chapter 9 Bypassing Automatic Configurations to Gain Control183

Chapter 10 Using Multiple OSs 203

Chapter 11 Managing Packages 231

Chapter 12 Filesystems and Files 249

Chapter 13 Managing Printers 269

Chapter 14 Programs and Processes 285

Chapter 15 Creating a Custom Kernel 301

Chapter 16 Optimizing X Configuration 321

Chapter 17 Protecting Your System with Backups 345

Chapter 18 System Security 361

Part IV Networking Tools 381

Chapter 19 Basic Network Configuration 383

Chapter 20 Controlling Network Access 407

Chapter 21 Detecting Intruders 429

Part V Server Tools 445

Chapter 22 Running Servers 447

Chapter 23 Getting More from a Web Server 465

Chapter 24 Serving Files 487

Chapter 25 Delivering E-Mail 509

Chapter 26 Providing Remote Login Access 545

Chapter 27 Miscellaneous Servers 571

Glossary 595

Index 613

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)