Linux Server Logs Explained

It’s a jungle out there, and when things go wrong in web hosting, they often go terribly wrong. It’s a tragic fact of life that not all technology is full-proof (or fool-proof) but just because you’ve encountered a problem doesn’t mean it’s the end of the world. In fact, with the handy help of a little bit of Linux log files, you’ll soon have your system right as rain!

What Are Log Files?

Log files are essentially transcripts of all the processes that are run underneath your operating system. They track what scripts are initiated, as well as how each initiation goes. If there’s an error that occurs, the log will say what kind of error it was, when it occurred, and what process caused the issue. A good way to think about logs is to imagine them as tiny memos for meetings within your operating system. They function in a similar manner, and they’re every bit as helpful.

The logs we’ll be talking about here are standard for most Linux operating system varieties—If you’re using Windows-based server, you’ll have to look elsewhere for information specific to your platform. However, no matter what Linux branch you’re running, you can expect to find most, if not all, of the files we mention. This is inherent to the way the operating system is constructed, and is yet another boon for using Linux on your servers.
serverlogs

Where Are The Logs, And What Do They Do?

All of the log files we’ll be mentioning can be found under the /var/log section of your
hosting Linux server. Within this directory, you’ll see a number of files, including the following, which we’ll explain:

boot: This here’s the log file for every time your server has been booted. If you’ve recently needed to reset or reboot your hardware, and encountered an error during the process, check here to find out exactly what went wrong.

daemon: A daemon is a specialized script that runs in the background without your input. This file shows you exactly which daemons have been called recently, as well as how they’ve been performing.

auth: This is an important one. Within this log you can track how many times users have connected to your server, as well as when they did so. More importantly, you can track how many times a user failed to log-in correctly, helping you keep an eye open for any unwanted intruders.

2 Comments

Leave a Reply