LINUX TROUBLESHOOTING PDF

adminComment(0)

Java and other issues might make GUI unavailable. Some of the names and labels it creates are strange. Some people are more familiar with the CLI. Linux. This guide will help you troubleshoot issues on your computers, find help You see an issue in Linux Mint, does it also happen in Ubuntu?. TROUBLESHOOTING IN LINUX. Here are some valuable tips to help you find important system files in RHEL 5, which get deleted by accident. Everything seems.


Linux Troubleshooting Pdf

Author:JULIUS CULLIVER
Language:English, Japanese, Dutch
Country:France
Genre:Fiction & Literature
Pages:115
Published (Last):06.03.2016
ISBN:607-4-31091-611-8
ePub File Size:18.57 MB
PDF File Size:8.86 MB
Distribution:Free* [*Register to download]
Downloads:46396
Uploaded by: NOELIA

More information and resrastraknabest.ga available at resrastraknabest.ga Feel free to contact the author: .. practice: troubleshooting tools. Identify, capture and resolve common issues faced by Red Hat Enterprise Linux administrators using best practices and advanced troubleshooting techniques. Quick Reference Card 11 Linux Troubleshooting #In bootgui: press, grub command line, or grub from Linux CLI . #IBM Redbook sgpdf.

This information includes man pages, info pages, the contents of documentation directories and documentation systems designed for specific programs or environments.

Knowing where to find useful information is a critical part of troubleshooting. Man pages are commonly under-appreciated. Not only do they serve as quick reminders for command options, but some programs make their complete documentation available as man pages. They can also be useful for programmers. Most core system libraries, and even some other libraries like OpenSSL, include documentation of each available function as a man page.

Similarly, perl has extensive and useful documentation available as man pages. While some man pages include simple examples, info pages are more likely to contain more extensive and useful examples. Info pages are also more likely to include useful tutorials. Info pages can be viewed with the info command.

Another useful application is the pinfo command, which allows viewing of info pages and supports features like highlighting, hyperlinks and the use of a mouse. Complex programs often include complete documentation systems. Some graphical programs include documentation under the Help menu item.

GNOME and KDE both provide frameworks that can be used to search and explore most forms of installed documentation including man and info pages.

Programming languages often also include custom solutions such as Perl's perldoc and Python's pydoc. Most packages include additional documentation and is usually stored in a documentation directory.

This directory can include changelogs, sample configuration files, or all of the documentation available on a project's web site. Inside that directory are versioned sub-directories for each RPM package.

Inside that directory are un-versioned sub-directories for each RPM package installed. Changelogs Most programs include a list of changes made each time a new version is released. This is called a changelog. Sometimes its included in the documentation directory. Other times it can be found on the project's Web site. Unlike most proprietary software, open source software is generally very good about including specific details.

Knowing what has changed, what bugs have been fixed, and what features have been added can be extremely useful when troubleshooting a specific program. Licensed to Robert Furesz Source Code When all else fails, the definitive source of software documentation is the source code itself. For a person with the necessary skills, the availability of source code is an empowering difference between open and closed software. For example, given a specific error message, it is possible to identify where in the code the message occurs and discover what conditions could trigger it.

Even if you're not a programmer, it can be useful to look at the source code and try to understand what is happening. Almost every significant program has a group of developers and users that work together to help each other. In fact, the line between developers and users often blurs as users contribute bug reports, fixes, documentation, and technical support.

Knowing how to find, use, and contribute to these communities is an important part of using open source software, and finding help. However, it is easy to continuously take from the community without giving anything in return.

Take some time to help others in the community. This will provide opportunities to learn while facing and helping to solve realistic problems. This experience may be invaluable when dealing with future problems. More importantly, you will be giving back to the community. Don't Get Side-tracked Exploring complex problems will invariably reveal new information. It is tempting to get side-tracked while researching information related to a problem.

It may seem obvious, but focusing on the problem itself is important to troubleshooting. Yes, having knowledge on a wide range of subjects is a characteristic of a good troubleshooter, but resist the urge to explore new terrain instead of solving the problem at hand. Mailing Lists forums and Usenet groups.

However, the most important form of communication in the open source world are email lists. Many projects have multiple mailing lists, some focused on development and testing, others on providing user support.

Some lists can generate a lot of traffic; subscribers may receive literally hundreds of messages per day. Using filters to organize mail is highly recommended. Before actively participating in an online community, it is a good idea to lurk in the background and learn cultural norms. Certain rules of online etiquette, known as netiquette, are common to almost all communities. Two good resources for learning proper netiquette are: y Eric S.

Online bug trackers make it possible to communicate an issue directly to the developers and to monitor the problem for a resolution. Until a fix is provided, work-arounds may also be documented in the bug tracker.

The Essential Cheat Sheet for Linux Admins

Instead of wasting time re-discovering a bug someone else has already found, it may already be listed in the bug tracker with a solution to the problem. Online bug trackers should be one of the first places to look online when troubleshooting. Most open source projects have Web sites, and some have Web Copying this manual is prohibited. It provides live interaction with developers and users. If you have a program that you use often, you should find whether there is an IRC community dedicated to that program, and participate.

This is a great way to make yourself visible to the community, and in doing so developers and users will be more inclined to help when you have a pressing need. Keep in mind that many IRC users are not always in front of their computer when you ask a question. Be patient when waiting for a response, or in understanding the response you get. It is also helpful to identify the difference between new users, and active members and developers. Finally, IRC is not entirely standardized, so different services may have different protocols and norms that need to be observed.

In the open source world, the most common IRC service is freenode. User Groups z u s e j. The most common of these are Linux User Groups. Local groups can also be found that focus on programming languages, such as Perl and Java, or software, such as Oracle. User groups generally have local meetings with some type of training, mailing lists for wide-ranging discussion, and social activities of some type. They can be a great way to meet people who share the same interests and will be able to help with problems in the future.

Search Engines Most everyone is aware that online search engines can be invaluable when troubleshooting. Tips for more effective searching include: y Search for exact error message. Otherwise, the search engine will focus on each word separately. For example, one possible search might be 'best linux text editor -emacs'. For example, 'troubleshooting class site:gurulabs. Determining the System's Configuration. Troubleshooting with rpm. Process Related Tools. Network Tools. A common set of tools used to collect information, and their application to the troubleshooting process, is described in more detail in the pages that follow.

Powerful query functions can verify packages and identify problems. Command s vmstat, iostat, sar Examine the state of system resources and sub-systems e.

CPU, memory, disk ip, ifconfig, route, arp Examine or change the configuration of network interfaces, ARP mappings, and network routes.

These examples illustrate a few invocations that can be useful for troubleshooting. Note that the information and format output by a query is highly flexible. For a list of variables that can be used when specifying the query output format, run: rpm -q --querytags. Display the names of the last three packages installed, along with their install date and time: rpm -qa --last head -n 3 ypserv This meta-data includes things such as the location, size, owner, permissions and MD5 hash for the file. The rpm command can be used to compare one or more package's existing files on the system with the package's original files at package install time.

This is a quick way to discover any changes to files provided by packages.

For example, consider the following output where files from the uucp package have been damaged: rpm -V T missing.. The modification time of call has changed, dial is missing from the system, the MD5 sum, and modification time, of dialcode have changed, the mode permissions of passwd has been modified, port now belongs to a different user and group, and sys has changed in size, MD5 sum, and modification time.

Things to consider when verifying packages: y Changes to files do not necessarily represent corruption or problems. Consider the case of configuration files that are expected to change. These files will not report changes when the package is verified. Signed packages offer two important advantages to end users who download them: y They authenticate the package, assuring the user that the package comes from the vendor it is supposed to come from.

Both of these features are important on today's Trojan Horse-riddled Internet. Source packages can be used to build binary RPMs and contain several different files such as: Spec files are included in each source package and describe the build process. Examining the.

These details can prove valuable when troubleshooting the service.

Your Answer

In the spec file, the number sign is used to denote comments, just as in many other Unix configuration files. One design principle behind RPM is that packages should always be compiled from the original source code for that application. Done Building data structures Do you want to install the software package? Reading database Unpacking prince 10r Setting up prince 10r Processing triggers for man-db 2.

If gdebi is not already installed then you can install it using aptitude as follows. If you're not logged in as root and you shouldn't be , then you can use sudo to run the yum command as root. The tarball packages can also be used on Linux when there is no.

In these cases this section contains the relevant installation instructions. The Generic Linux package should be able to run on a wider range of Linux versions than other packages.

These packages rely on some shared libraries installed on your system. To install Prince from a tarball enter these commands. Thank you for choosing Prince 10r2, we hope you find it useful. Start by unpacking the package. Change into the new directory unpacked by the package. If you're installing Prince for only one user and not using sudo you will need to choose a directory that you have write access to.

See your operating system's or shell's documentation for how to do this. Installing a license file If you've downloadd Prince you can install your license file which you will receive via e-mail to remove the watermark on generated documents.

This section will explain how to install the license file. If instead you're using the free version of Prince then you don't need to install a license file. Installing a license file on Windows On Windows you can install a license by following these steps: Open the license window by clicking the License icon in the main window.

Click the license button Click the open button and choose your license file. License window The license should be displayed in the lower part of the window, click the accept button to install it then click Ok. License window with license Installing a license file on other systems On other systems copy the license. Test License Remember to backup your license file in case you want to reinstall Prince in the future. User Groups z u s e j.

The most common of these are Linux User Groups. Local groups can also be found that focus on programming languages, such as Perl and Java, or software, such as Oracle.

User groups generally have local meetings with some type of training, mailing lists for wide-ranging discussion, and social activities of some type. They can be a great way to meet people who share the same interests and will be able to help with problems in the future. Search Engines Most everyone is aware that online search engines can be invaluable when troubleshooting. Tips for more effective searching include: y Search for exact error message.

Otherwise, the search engine will focus on each word separately. For example, one possible search might be 'best linux text editor -emacs'.

For example, 'troubleshooting class site:gurulabs. Determining the System's Configuration. Troubleshooting with rpm. Process Related Tools.

Network Tools. A common set of tools used to collect information, and their application to the troubleshooting process, is described in more detail in the pages that follow. Powerful query functions can verify packages and identify problems. Command s vmstat, iostat, sar Examine the state of system resources and sub-systems e.

CPU, memory, disk ip, ifconfig, route, arp Examine or change the configuration of network interfaces, ARP mappings, and network routes. These examples illustrate a few invocations that can be useful for troubleshooting.

13 Linux Network Configuration and Troubleshooting Commands

Note that the information and format output by a query is highly flexible. For a list of variables that can be used when specifying the query output format, run: rpm -q --querytags. Display the names of the last three packages installed, along with their install date and time: rpm -qa --last head -n 3 ypserv This meta-data includes things such as the location, size, owner, permissions and MD5 hash for the file. The rpm command can be used to compare one or more package's existing files on the system with the package's original files at package install time.

This is a quick way to discover any changes to files provided by packages. For example, consider the following output where files from the uucp package have been damaged: rpm -V T missing.. The modification time of call has changed, dial is missing from the system, the MD5 sum, and modification time, of dialcode have changed, the mode permissions of passwd has been modified, port now belongs to a different user and group, and sys has changed in size, MD5 sum, and modification time.

Things to consider when verifying packages: y Changes to files do not necessarily represent corruption or problems. Consider the case of configuration files that are expected to change. These files will not report changes when the package is verified. Signed packages offer two important advantages to end users who download them: y They authenticate the package, assuring the user that the package comes from the vendor it is supposed to come from. Both of these features are important on today's Trojan Horse-riddled Internet.

Source packages can be used to build binary RPMs and contain several different files such as: Spec files are included in each source package and describe the build process.

Examining the. These details can prove valuable when troubleshooting the service. In the spec file, the number sign is used to denote comments, just as in many other Unix configuration files. One design principle behind RPM is that packages should always be compiled from the original source code for that application. This criterion is important in the Linux community, where individual applications are developed by a large, loosely organized collection of organizations all over the Internet, and then collated into a cohesive operating system by distribution vendors.

Distribution vendors often need to modify the original source code to better integrate it into the distribution and to patch bugs. Similarly, end users often need to recompile and occasionally need to patch applications shipped by their distribution vendor to better suit their local environment.

Together, these sections define the source files and patches which make up the application, provide detailed information about the source and use of the application, instruct RPM how to compile the application, define the files which RPM needs to install when installing the application, as well as how to install those files.

Preparing RPMs from original source code and applying separate patches helps ensure long-term ease of maintenance. It also allows end-users to easily determine exactly how a package has been modified. As the Linux kernel loads, it scans for hardware and then loads drivers to initialize and support the detected hardware.

Troubleshooting Manual

Examining kernel boot messages is a good way to see what hardware has been detected. You can view the current kernel messages at any time with the dmesg command.

A copy of the kernel messages is made near the end of the boot sequence and stored so it can be examined long after the in memory messages have been overwritten. You can use the cat command to display the contents of the files in these filesystems. The udevadm command can be used to query the database by device paths or names and return all the properties associated with the device.

Invoking hwinfo Manually Model: 6. By default, it will scan for nearly every type of device that it is capable of detecting. Options can be passed to limit the scan to a specific subset of devices. The following examples show using hwinfo to list a few details for a few specific types of hardware: hwinfo --cpu --short cpu: Intel R Xeon R CPU 2. This allows examination of the boundary layer between the user and kernel space which can be very useful for identifying why a process is failing.

Using strace to analyze how a program interacts with the system is especially useful when the source code is not readily available.

In addition to its importance in troubleshooting, strace can provide deep insight into how the system operates. Any user may trace their own running processess; additionally, the root user may trace any running processess. Output from a system call is comprised of three components: The system call, any arguments surrounded by paranthesis, and the result of the call following an equal sign.

An exit status of -1 usually indicates an error. Curly braces are used to indicate dereferenced C structures. Square braces are used to indicate simple pointers or an array of values.

Since strace often creates a large amount of output, it's often convenient to redirect it to a file. For example, the following could be used to launch the Z shell, trace any forked child processes, and record all file access to the files. Run the ls command counting the number of times each system call was made and print totals showing the number and time spent in each call useful for basic profiling or bottleneck isolation : strace -c ls. The following example shows the three config files that OpenSSH's sshd reads as it starts.

The ltrace Command The ltrace command can be used to intercept and record the dynamic calls made to shared libraries. The amount of output generated by the ltrace command can be overwhelming for some commands especially if the -S option is used to also show system calls. You can focus the output to just the interaction between the program and some list of libraries. For example, to execute the id -Z command and show the calls made to the libselinux.

An open file can be of any of the following types: a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file Internet socket, NFS file, or Unix domain socket. The lsof command has numerous options that allow you to selectively display only the type of files you want, and to format the display making the output easily parsable by other programs. The fuser command has some overlap with lsof in its functionality and is used to list the process IDs of processes accessing the specified file or filesystem.

Licensed to Robert Furesz The fuser command can also be used to send signals to the processes accessing files. This is useful when troubleshooting because some processes will fail to start often without explanation if they require one of these IPC mechanisms and can not allocate it. One possible reason a process might fail when attempting to obtain one of these IPC facilities is simple resource consumption.

A limited number of each exists. Current usage and limits can be shown with the -u and -l options, as shown here: ipcs -u Shared Memory Status segments allocated 1 pages allocated 96 pages resident Since these IPC structures are, of necessity, shared resources, it is not always possible for a terminating application to free release the structure.

This can lead to a build up of open but unused structures that can result in resource exhaustion or collisions when the application tries to start later. Safely releasing these resources generally requires an excellent understanding of the programs in question. One good way to identify abandoned resources is to use the -t option to list the times associated with each IPC resource: ipcs -t.

Once you have identified a resource that must be freed, you can use the ipcrm command to release the resource: ipcrm -s Copying this manual is prohibited. Licensed to Robert Furesz vmstat can also output statistics for a specified number of samples at a specified interval. The following example will output memory and other statistics every 2 seconds for a total of 10 samples: vmstat 2 10 procs memoryr b swpd free buff cache 0 0 0 0 0 0 0 0 0 Note that this does NOT read data from the drive and in no way indicates the performance of the drive.

Instead, it measures the throughput of the system cache, CPU and memory. This ensures that the system can allocate memory to the buffer cache. When used together, more accurate readings are 2.

Using the -t option with the hdparm command measures the throughput for reading data through the buffer cache from disk. This reading gives an indication of how fast the disk can sustain sequential data read. Note that this does NOT access the disk via normal filesystem calls. When troubleshooting these problems, be sure to examine the transmission statistics in addition to the basic network address and prefix values.

It is generally more powerful than the tools that it replaces and allows lower level changes. For example, to see the layer 2 and 3 addresses assigned to the eth0 interface: Changes made while running ip interactively will not persist after a reboot.

However, Linux distributions have boot scripts and network configuration facilities which call ip and configure network settings based on stored values. If the destination host is on the local segment, then the MAC address used will be that of the end host. If the routing process on the local host determines that the destination host is on a remote segment, then a lookup is done in the local route table for a matching route.

However, that IP packet will be riding inside many different layer 2 frames. For example, to list all the current known IP to MAC mappings with numerical output run: ip neigh When a system is modified in any way, the change should be recorded. There are two type of omissions: complete or partial. If organizational policy demands good documentation, make producing and using documentation as easy as possible.

Some solutions include the danger of new problems in the future and should therefore be avoided. A limited number of each exists. The following examples show using hwinfo to list a few details for a few specific types of hardware: hwinfo --cpu --short cpu: Intel R Xeon R CPU 2.

Distribution vendors often need to modify the original source code to better integrate it into the distribution and to patch bugs. Online bug trackers make it possible to communicate an issue directly to the developers and to monitor the problem for a resolution.

Some services include syntax checkers that can be run before the service is restarted or reloaded with the new configuration.