Linux Troubleshooting-Thought Chapter

Source: Internet
Author: User

Linux Troubleshooting Ideas

The basic idea of troubleshooting: the computer itself will not make mistakes, it is a tool and a carrier, only according to the people entered the command or program execution. The error is due to people in the operation of the problem, or the design of the time when there are bugs, or even hardware defects and so on.

1. View failure Information location Failure

1) First check the error message

The error message will directly reflect the program at the time of operation, that piece of what happened wrong, in general, will directly point out the relevant issues, according to its prompt to check. If you are particularly familiar with the error, you will be aware of where errors have occurred, so you need to accumulate them.

2) Second View log information

Sometimes the error message is relatively simple, can not meet the problem of positioning, so you need to look at the log, the log information will have clear all the hints, the program is how to run, run to which step, which step there is a problem, there are errors. Then, according to the log file to determine the error of the program. Also need to accumulate related error log information, the more familiar, the faster the location.

2. Breakpoint Test command line or program location failure

1) run a complex command into multiple simple commands

If the first step of the log error method can not be resolved, you need to take the command step by step, to achieve grandfather become better effect. Split complex commands from scratch into simple commands to make sure each simple command executes successfully, and if there is a problem, the problem should be in that place

2) Run the simplest basic model first and expand it on this basis

If it is a programming and script design, it is best to check the core of the function code or program , one step, one step to expand the inspection, and finally solve the problem.

3. start from scratch by building the relevant requirements (re-step to check) locating the fault

If the previous methods are not effective, all need to start from scratch, according to the requirements and sequence of the construction of an inspection, related and re-come again. (In general, this method is suitable for more careful people, check their own errors sometimes can not check out)

4. compare to check location fault

This method is suitable for larger programming, more code, or previously run the correct situation, now there are problems. Enter a file for the command and all operations and all commands, and then find a file that was previously run successfully or someone else to run the successful file, using diff or vimdiff, Believe that the general problem is directly visible to you.

5. Troubleshooting cheats: Thought positioning failure

There are some failures that are not in line for a long time, often at the lowest level, the easiest to overlook, or something that makes you feel impossible to go wrong.

6. Troubleshooting the final secret: The software is really a BUG, or the hardware is broken





Linux Troubleshooting-Thought Chapter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.