{"id":4311,"date":"2021-11-23T12:41:43","date_gmt":"2021-11-23T12:41:43","guid":{"rendered":"https:\/\/www.jameseduard.com\/?p=4311"},"modified":"2021-11-23T12:41:43","modified_gmt":"2021-11-23T12:41:43","slug":"how-to-check-your-servers-log-files","status":"publish","type":"post","link":"https:\/\/www.jameseduard.com\/?p=4311","title":{"rendered":"How to Check your Server&#8217;s Log Files"},"content":{"rendered":"<p>[vc_row][vc_column][vc_column_text]<\/p>\n<section class=\"default\">\n<div class=\"sheet-block\">\n<div class=\"ce-textpic ce-center ce-above\">\n<div class=\"ce-bodytext\">\n<p class=\"lead-paragraph\">In this article we&#8217;ll guide on you how to check your server&#8217;s log files in windows and linux system.<\/p>\n<\/div>\n<\/div>\n<h3 class=\"subheadline-section\">Microsoft Windows Server<\/h3>\n<div class=\"ce-textpic ce-center ce-above\">\n<div class=\"ce-bodytext\">\n<p class=\"content-paragraph\">We recommend that you use the Event Viewer to evaluate the log files.\u00a0To open the Event Viewer, press the key combination\u00a0<strong>Win\u00a0<\/strong>+<strong>\u00a0R<\/strong>. Then enter the command\u00a0<span class=\"control-element\"><strong>eventvwr<\/strong><\/span>\u00a0and press\u00a0<strong>Enter<\/strong>.<\/p>\n<p class=\"content-paragraph\">In the navigation bar on the left, click\u00a0<span class=\"control-element\">Windows Logs.<\/span>\u00a0Then check the following logs:\u00a0<strong>Application<\/strong>,\u00a0<strong>System<\/strong>\u00a0and\u00a0<strong>Security<\/strong><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section id=\"c137654\" class=\"default\">\n<div class=\"sheet-block\">\n<h3 class=\"subheadline-section\">Linux<\/h3>\n<div class=\"ce-textpic ce-center ce-above\">\n<div class=\"ce-bodytext\">\n<p class=\"content-paragraph\">Save the file<strong>\u00a0\/var\/log\/warn<\/strong>\u00a0as a duplicate in the\u00a0<strong>\/tmp<\/strong>\u00a0directory. To do this, enter the following command:<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]cp \/var\/log\/warn \/tmp[\/simterm]<\/span><\/p>\n<p class=\"content-paragraph\">Then check the file.<\/p>\n<\/div>\n<\/div>\n<div class=\"ce-textpic ce-center ce-above\">\n<div class=\"ce-bodytext\">\n<p class=\"content-paragraph\">To search the messages logged during the last boot for entries, you can use the following commands:<\/p>\n<\/div>\n<\/div>\n<div class=\"ce-textpic ce-center ce-above\">\n<div class=\"ce-bodytext\">\n<p class=\"content-paragraph\">This command searches the boot log file for lines containing the strings Erro or erro.<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]dmesg | grep [Ee]rro[\/simterm]<\/span><br \/>\nThis command searches the boot log file for lines in which the strings Fault or fault are included.<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]dmesg | grep [Ff]ault[\/simterm]<\/span><br \/>\nThis command searches the boot log file for lines which contain the strings Defect or defect.<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]dmesg | grep [Dd]efect[\/simterm]<\/span><br \/>\nThis command searches the boot log file for lines in which the strings Bad or bad are included.<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]dmesg | grep [Bb]ad[\/simterm]<\/span><\/p>\n<p class=\"content-paragraph\">This command searches the boot log file for lines containing the strings Fail or fail.<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]dmesg | grep [Ff]ail[\/simterm]<\/span><br \/>\nThis command searches the boot log file for lines that contain the strings Incorrect or incorrect.<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]dmesg | grep [Ii]ncorrect[\/simterm]<\/span><\/p>\n<p class=\"content-paragraph\">This command stores all messages which were logged during the last boot process in the directory \/tmp.<\/p>\n<p class=\"content-paragraph\"><span class=\"code-snippet\">[simterm]dmesg &gt; \/tmp\/dmesg[\/simterm]<\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section id=\"c138438\" class=\"default\">\n<div class=\"sheet-block\">\n<h3 class=\"subheadline-section\">\/var\/log\/messages and \/var\/log\/syslog<\/h3>\n<div class=\"ce-textpic ce-center ce-above\">\n<div class=\"ce-bodytext\">\n<p class=\"content-paragraph\">In Ubuntu and Debian, the file\u00a0<strong>\/var\/log\/<\/strong>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.<\/p>\n<p class=\"content-paragraph\">In CentOS, this information is listed in the file\u00a0<strong>\/var\/log\/syslog<\/strong>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section id=\"c138440\" class=\"default\">\n<div class=\"sheet-block\">\n<h3 class=\"subheadline-section\">kern.log<\/h3>\n<div class=\"ce-textpic ce-center ce-above\">\n<div class=\"ce-bodytext\">\n<p class=\"content-paragraph\">Messages from the kernel can be found in the\u00a0<strong>kern.log<\/strong>\u00a0file. This file also contains older messages and messages resulting from iptables rules, for example. The kern.log file can be found in the\u00a0<strong>\/var\/log directory<\/strong>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<p>[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text] In this article we&#8217;ll guide on you how to check your server&#8217;s log files in windows and linux system. Microsoft Windows Server We recommend that you use the Event Viewer to evaluate the log files.\u00a0To open the Event Viewer, press the key combination\u00a0Win\u00a0+\u00a0R. Then enter the command\u00a0eventvwr\u00a0and press\u00a0Enter. In the navigation bar on the<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,620,63],"tags":[34,842,843],"class_list":["post-4311","post","type-post","status-publish","format-standard","hentry","category-linux","category-security","category-windows","tag-security","tag-syslog","tag-system"],"_links":{"self":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/4311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4311"}],"version-history":[{"count":0,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/4311\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}