I've been trying to learn *nix and I think I'm doing pretty good as far as basic commands, and I think I understand a lot of the "monitoring" type commands etc... in short, I think I'm doing okay with syntax type stuff.

And doing stuff like setup of xyz is more or less straight forward...but I really want to start learning how to do is troubleshoot/diagnose problems and be able to fix them. For example, if I go to my website and it's not loading...what would be the first thing I should check for? That sort of thing.

So I figured there's probably some good books out there about what to do when things go wrong, what to start looking for, how to identify what is going wrong and how to fix it etc...so I was looking for some recommendations on where I should turn to for that?

Any good books out there? I did do a little bit of researching before posting here...seems like most books I've looked at so far focus on install, backup and general syntax...but that stuff is easy and straight forward to digest...I'm looking for the stuff that will help me become a better detective and *nix problem solver...

p.s. - I'm currently using centOS 5.3 but from what I can tell, a lot of things are generic and can work from *nix system to *nix system so I don't think I necessarily need it to be centOS specific...


I ended up getting 3 books:

Linux Troubleshooting Bible

Linux Server Hacks

Linux Server Hacks, Volume 2 (can't post link due to posting restrictions but you can find it easy enough from first link)


There's no book on this subject that I know of, you get experience troubleshooting by doing it. You become better at troubleshooting as you understand how all the different components of a system work together.

In the example you gave of a website not loading, I've seen the following following cause that to happen (list is not exclusive):

  • DNS not resolving
  • domain expired
  • partition ran out of space
  • apache is trying to write to a log file that doesn't exist or doesn't have permissions
  • server ran out of RAM
  • apache isn't running
  • memcached is down
  • mysql is down
  • mysql is up, but overloaded
  • apache is hitting MaxClients
  • someone changed something in the code and it broke
  • someone upgraded their CMS and it broke
  • permissions wrong on files
  • .htaccess got changed
  • some process is hogging all of the server's resources
  • some package on the system the website needs was changed, upgraded, or removed

In the above, you can check the DNS and domain expiration problems with dig and whois. When you ssh to the server, does it seem like its slow and lagging? Something is probably using the systems resources.

Is apache running? You can see if its hitting MaxClients with pgrep httpd | wc -l but why is it hitting MaxClients now? Is MySQL running? How many queries are running? Are they taking a long time?

Did someone change the files? cd to the websites home and run find . -mtime -2 to see what has changed in the past two days. Look in your site's error log for problems. Look in /var/log/messages for problems.

As you can see, there's a lot of components that need to work together for a website to load and you need to understand how they interact and how to know eliminate each of them as a possible culprit to your problem. Knowing how to do this comes through experience. You might end up chasing a red herring when solving a problem but that is what gives you experience for the next problem. While the red herring wasn't the cause of your problem, you at least understand that component of the system now.

  • well, yes. I understand tracking down stuff like this can be complex. And I also understand that experience is a good teacher...but surely there has got to be a book or two out there that describes things along the lines of what you have just described... – sildhe Apr 3 '11 at 21:09
  • @sildhe : Sorry, probably the reason there are so few replies is that no one else knows of a book on this subject either. I buy (or at least look at) every book I see with either Unix/Linux or Debugging in the title. I haven't seen anything like this. (I'm not saying for certain that no such book exists, and hopefully someone will post the name ;-). Just be thankful you are living in the age of StackExchange. Now you can get advice on how to check any of the items in the list above, often within minutes. I'm keeping that list, A big thanks to @mmckinst! – shellter Apr 4 '11 at 2:35
  • Yeah it's all good...I ended up buying a couple books that I was seemingly getting a good vibe from, from my initial researching. I got them used off amazon, total $22 including shipping for all 3! Will see how it goes (I edited my original post to include what I got, if anybody else is interested) – sildhe Apr 4 '11 at 22:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.