Knowledgebase

Paths to some of the most important logs on your Dedicated server and how to use them

Browsing through the appropriate logs is key element of the troubleshooting process. For example if your website loads slow, you will have to check few logs in order to find the exact reason for this and to apply a fix if possible.

Logs, however, can contain millions of lines. It is easy to get lost in so many information without filtering it.

First, you can start by using the tail -n100 command to get the last 100 lines from the log file. You can change the number to broaden or narrow down your search.

Once you have the desired amount of results you need to search for a certain pattern in them. For example, you can type the following command to check the last 100 lines of the e-mail log file:

tail -n1000 /var/log/exim_mainlog |grep "EMAIL"

Replacing EMAIL with your e-mail address will show you only the lines recorded about e-mails sent from or to the particular e-mail address.

Below, you can find the paths to some of the most useful logs:

  • E-mail activity: Detailed information for each message you send or receive will be saved in this log -/var/log/exim_mainlog
  • MySQL slow queries: If your databases produce "slow" queries, they will be written to this log -/var/lib/mysql/mysql-slow.log
  • CronJobs executions log: Each time a cron job is executed, a log will be saved at this location - /var/log/cron
  • FTP logs: The connections made to your server via FTP and the transferred files will be logged at these files -/var/log/messages and /var/log/xferlog
  • Apache access log: This is the raw access log for your website. Each IP that has accessed your website will be logged here - /usr/local/apache/domlogs/YOURDOMAINNAME
  • Apache Error Log - If the Apache web server fails to start, stop or restart, the error message will be saved to this file - /usr/local/apache/logs/error_log

You need help managing your dedicated server? We got it! SiteGround experts not only write helpful articles, but also manage the servers for our clients so they don’t have to read articles like this one.Learn more.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reboot your dedicated server via WHM?

The WHM panel provides two options for a server reboot: Forceful Server Reboot Graceful...

How to change the password for the root user via WHM?

In order to change the password for the root user you will need to access the WHM panel and...

How to access WHM?

WHM stands for Web Host Manager. This is the cPanel's server administrative management software....

How to restart a service on my dedicated server?

In order to restart a service on your dedicated machine, follow these steps: Log in your WHM...

How to edit the MX records of a domain on my dedicated server via WHM?

In order to edit an MX record of a domain on your dedicated server, follow these steps: Log in...

Copyright © 2013<script>new Date().getFullYear()>2010&&document.write("-"+new Date().getFullYear());</script>, HostLantern. All Rights Reserved.