In this article, we'll show you how to check your server's log files. Simply follow the steps below.
Microsoft Windows Server
We recommend that you use the Event Viewer to evaluate the log files. To open the Event Viewer, press the key combination Win + R. Then enter the command eventvwr and press Enter.
In the navigation bar on the left, click Windows Logs. Then check the following logs: Application, System and Security
Save the file /var/log/warn as a duplicate in the /tmp directory. To do this, enter the following command:
cp /var/log/warn /tmp
Then check the file.
To search the messages logged during the last boot for entries, you can use the following commands:
This command searches the boot log file for lines containing the strings Erro or erro.
dmesg | grep [Ee]rro
This command searches the boot log file for lines in which the strings Fault or fault are included.
dmesg | grep [Ff]ault
This command searches the boot log file for lines which contain the strings Defect or defect.
dmesg | grep [Dd]efect
This command searches the boot log file for lines in which the strings Bad or bad are included.
dmesg | grep [Bb]ad
This command searches the boot log file for lines containing the strings Fail or fail.
dmesg | grep [Ff]ail
This command searches the boot log file for lines that contain the strings Incorrect or incorrect.
dmesg | grep [Ii]ncorrect
This command stores all messages which were logged during the last boot process in the directory /tmp.
dmesg > /tmp/dmesg
/var/log/messages and /var/log/syslog
In Ubuntu and Debian, the file /var/log/messages will records almost all events. This is the system log of Linux. This file records a variety of events, such as system error messages, changes in the network configuration, etc. In this log file, each entry is listed with a timestamp.
In CentOS, this information is listed in the file /var/log/syslog.