2. F inding Additional Documentation
Once you’ve located documentation files, you must know how to
read them.
The details, of course, depend on the documentation’s file
format. You can use
less to read many files. Most distributions configure less in such
a way that it
can interpret common file formats, such as HTML, and to
automatically decompress
files that are stored in compressed format to save disk space.
Table 8.4 summarizes
common documentation file formats and the programs you can
use to
read them. Which formats are used varies from one program to
another.
3. Locating Program Documentation
Online
HOWTOs Linux HOWTO documents are short and medium-
length tutorial
pieces intended to get you up to speed with a topic or technology.
In the past,
smaller HOWTOs were classified separately, as mini-HOWTOs;
however, the distinction
between the two types of document has diminished greatly in
recent years.
HOWTOs have varying focus—some describe particular
programs, whereas others
are more task-oriented and cover a variety of tools in service to
the task. As the
name implies, they’re generally designed to tell you how to
accomplish some goal.
4. Guides
Guides are longer documents, often described as book-
length. (In fact,
some of them are available in printed form.) Guides
are intended as thorough
tutorial or reference works on large programs or
general technologies, such as
Linux networking as a whole
5. FAQs
A Frequently Asked Question (FAQ) is, as the name implies, a
question
that comes up often—or more precisely, in the sense of the LDP
category, that
question and an answer to it. LDP FAQs are organized into
categories, such as
the Linux-RAID FAQ or the WordPerfect on Linux FAQ. Each
contains multiple
questions and their answers, often grouped in subcategories. If
you have a specific
question about a program or technology, looking for an
appropriate FAQ
can be a good place to look first for an answer.
6. Most Linux distributions include the LDP documents in one or
more special
documentation packages. Check your /usr/doc and
/usr/share/doc directories
for these files. If they’re not present, look for likely packages
using your package
management tools. On the other hand, using the online versions
of LDP
documents can be desirable because you can be sure they’re the
latest available.
Those that ship with a distribution can be weeks or months out
of date by the
time you read them.
7. Consulting Experts
Local experts Whether it’s the Linux expert in the next
office, a next-door
neighbor, or a fellow student, a person who you know
and who knows more
about Linux than you can be a valuable resource.
8. Paid consultants Paying somebody a consulting fee can
often be worthwhile
to fix a thorny problem, particularly if you’re facing a
“time is money” situation
in which a delay in solving the problem will literally
cost money. A Web search
will turn up numerous Linux consulting firms.
9. Program authors Many open source authors are happy
to answer questions or
provide limited support, particularly if your problem is
caused by a bug. Bigger
projects (including most Linux distributions) have
many authors, and these
projects often provide Web forums, mailing lists, or
Usenet newsgroups to help
users and developers communicate.
10. Web forums, mailing lists, and Usenet newsgroups These
resources differ
in format but serve similar purposes: They enable users to
communicate with
one another and share their expertise. Many distributions
have dedicated Web
forums; try a Web search on your distribution name and
forum to find yours.
Mailing lists are more common for individual programs.
Search the program’s
main Web site for information on mailing lists. Usenet
newsgroups were popular
11. IRC Internet Relay Chat (IRC) is a tool for real-time text-mode
communication
among small groups of people. To use IRC, you need an IRC
client program, such
as Irssi (http://www.irssi.org), BitchX (http://www.bitchx.com),
or ChatZilla
(http://www.hacksrus.com/~ginda/chatzilla/). You can then join
an IRC
channel, in which IRC users exchange messages in real time.
IRC, like Web
forums, mailing lists, and newsgroups, enables users to
communicate directly
with one another; but IRC can provide quicker solutions to
problems.
12. Web searches Web search engines index many
Internet resources, including
man pages, program documentation sites, Web
forums, and even IRC channel
discussions. Thus, a Web search can provide you with
an answer from an expert
without your needing to contact the expert directly
13. Managing RPM Systems
RPM-based distributions include Red Hat, Fedora,
CentOS, SUSE Enterprise, openSUSE,
and Mandriva. The basic tool for installing software on
these distributions is
the text-mode rpm command. This program works on local
files, though; to use a
network repository, you must use another tool, which
varies by distribution:
Red Hat, Fedora, and CentOS use the text-mode yum or
various
14. Managing Debian Systems
The Debian GNU/Linux distribution created its own
package system, and distributions
based on Debian, such as Ubuntu and Mint, use the
same system. Atop
the basic Debian package system lies the Advanced
Package Tool (APT), which
provides access to network repositories.
15. Understanding the Process
Hierarchy
The Linux kernel is the core of a Linux installation.
The kernel manages memory,
provides software with a way to access the hard disk,
doles out CPU time,
and performs other critical low-level tasks. The kernel
is loaded early in the boot
process, and it’s the kernel that’s responsible for
managing every other piece of
software on a running Linux computer.
16. One of the many ways that the kernel imposes order on the potentially
chaotic
set of running software is to create a sort of hierarchy. When it boots,
the
kernel runs just one program—normally /sbin/init. The init process is
then
responsible for starting all the other basic programs that Linux must
run, such
as the programs that manage logins and always-up servers. Such
programs,
if launched directly by init, are called its children. The children of init
can
in turn launch their own children. This happens when you log into
Linux. The
process that launched a given process is called its parent
17. Identifying Running Processes
Before you can manage processes, you must be able to
identify them. The ps
and top utilities can help you identify processes. In
either case, you can search
for processes in various ways, such as by name or by
resource use. You may also
want to identify how much memory your processes are
consuming, which you
can do with the free command.
18. Using top to Identify Processes
Although ps can return process priority and CPU use
information, the program’s
output is usually sorted by PID number, and provides
information at only a single
moment in time. If you want to quickly locate CPU- or
memory-hogging processes,
or if you want to study how resource use varies over time,
another tool is more
appropriate: top. This program is essentially an interactive
version of ps. Figure 9.4
shows top running in a GNOME Terminal window.
19. Measuring Memory Use
Processes consume a number of system resources, the
most important of these being
CPU time and memory. As already noted, top sorts
your processes by CPU time by
default, so you can identify processes that are
consuming the most CPU time. You
can press the M key within top to have it sort by
memory use,
20. Using Log Files
Many programs that run in the background (that is, daemons) write
information
about their normal operations to log files, which are files that record such
notes.
Consulting log files can therefore be an important part of diagnosing problems
with daemons. The first step in doing this is to locate your log files. In some
cases, you may need to tell the program to produce more verbose output to
help
track down the problem, so I provide some pointers on how to do that. Finally,
I describe the kernel ring buffer, which isn’t technically a log file but can fill a
similar role for kernel information.