<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; /var/log</title> <atom:link href="http://www.ghacks.net/tag/varlog/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Easy Linux Log Viewing with Log Viewer</title><link>http://www.ghacks.net/2009/03/13/easy-linux-log-viewing-with-log-viewer/</link> <comments>http://www.ghacks.net/2009/03/13/easy-linux-log-viewing-with-log-viewer/#comments</comments> <pubDate>Fri, 13 Mar 2009 19:59:26 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[/var/log]]></category> <category><![CDATA[log files]]></category> <category><![CDATA[log viewer]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=11201</guid> <description><![CDATA[If you administer a Linux system or you need to troubleshoot an issue, you know that the Linux /var/log directory can quickly overwhelm you. Where do you look and what are you looking for? What about view on a per-date basis? Not an easy task is it? It can be if you scrap the command [...]]]></description> <content:encoded><![CDATA[<p>If you administer a Linux system or you need to troubleshoot an issue, you know that the Linux <strong>/var/log</strong> directory can quickly overwhelm you. Where do you look and what are you looking for? What about view on a per-date basis? Not an easy task is it? It can be if you scrap the command line and fire up the GNOME Log Viewer application.</p><p>Log Viewer is a simple GUI tool that houses all your log files in one convenient location with a point and click interface and a user-friendly calendar that helps you navigate through dates.</p><p><span
id="more-11201"></span><strong>Fire It Up</strong></p><p>Starting Log View is simple. Go to the Applications menu and click the System Tools sub menu. Within the System Tools sub menu you will see the System Log entry which, when clicked, will ask for your root password. After you enter the root password the Log Viewer application will start.</p><div
id="attachment_11202" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/03/log_view_main.png"><img
class="size-medium wp-image-11202" src="http://www.ghacks.net/wp-content/uploads/2009/03/log_view_main-500x333.png" alt="Log Viewer" width="300" height="200" /></a><p
class="wp-caption-text">Log Viewer</p></div><p>When you first open Log Viewer it will most likely default to the Xorg.0.log file. You will have access to any of the log files within the the <strong>/var/log</strong> directory. And any of those logs that have dated entries will allow you to click through the calendar to view other dates of your log file. If the log file you are viewing does not have dated entries (or archived entries) the calendar will be grayed out.</p><p>To view archived logs you will click the Version dropdown which will reveal how ever many versions (or archives) of the particular log file you are viewing.  For instance if I click on the <em>Xorg.0.log</em> file I have the current entry and one other archive. If I click on the <em>messages</em> log file I will see the current entry as well as archives 1 &#8211; 4.</p><p>You can also add a filter to your viewing. This will be very helpful when you are troubleshooting. Say, for example, you are trying to track down a particular rogue IP address within the <em>secure</em> log. Click the Ctrl-f combination to open the Filter text box and enter the IP address when viewing the <em>secure </em>log file. If the IP address you are searcing for is in the log file, any entry containing that IP address will show up in the viewing area.</p><p><strong>Final Thoughts</strong></p><p>I am a frequent viewer of log files. Any time I am troubleshooting the <strong>/var/log</strong> directory is the first place I turn. But sometimes searching for a needle in a haystack can require more time than I have. With the help of Log Viewer this task is made much easier.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/03/13/easy-linux-log-viewing-with-log-viewer/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Learning Linux: Log Files</title><link>http://www.ghacks.net/2009/02/16/learning-linux-log-files/</link> <comments>http://www.ghacks.net/2009/02/16/learning-linux-log-files/#comments</comments> <pubDate>Mon, 16 Feb 2009 14:36:09 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[/var/log]]></category> <category><![CDATA[administration]]></category> <category><![CDATA[log files]]></category> <category><![CDATA[messages]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[tail]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10586</guid> <description><![CDATA[If you are serious about learning Linux then one aspect you will want to familiarize yourself with is log files. This concept will help you to understand why when you go to a mailing list with a problem and, when someone asks you the contents of a particular log file, you are able to offer [...]]]></description> <content:encoded><![CDATA[<p>If you are serious about learning Linux then one aspect you will want to familiarize yourself with is log files. This concept will help you to understand why when you go to a mailing list with a problem and, when someone asks you the contents of a particular log file, you are able to offer enough information to help solve your problem. Log files are very good for helping you deduce what is going wrong with a system. There are, however, a lot of log files to wade through. That&#8217;s where I come in. In this article I am going to show you the first places to look when you have problems with a Linux system. I won&#8217;t cover all of the log files (at least yet), but I will get you started on what will hopefully become a long history of too much information.</p><p><span
id="more-10586"></span><strong>dmesg</strong></p><p>When I have a problem (or when I am attaching a usb device) one of the first places I go is the <em>dmesg</em> command. The <em>dmesg</em> command prints out the kernel keyring buffer. The information you will get will be all of the information you do not see when your system is booting. This is a great place to get information (low level) on your hardware. On one of my laptops, I run <em>dmesg</em> and near the top I see:</p><p><code>Phoenix BIOS detected: BIOS may corrupt low RAM, working it around.<br
/> last_pfn = 0x7f6d0 max_arch_pfn = 0x100000<br
/> x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106<br
/> kernel direct mapping tables up to 38000000 @ 10000-15000<br
/> Using x86 segment limits to approximate NX protection<br
/> RAMDISK: 37c6a000 - 37fef4a2<br
/> </code></p><p>From that I can tell I have a Phoenix bios. Pretty obvious. A little later I see:</p><p><code>Security Framework initialized<br
/> SELinux:Â  Initializing.<br
/> SELinux:Â  Starting in permissive mode</code></p><p>Now I know Security Enhanced Linux is starting, in permissive mode, at bootup. And even further on down the line I see:</p><p><code>CPU1: Intel(R) Pentium(R) DualÂ  CPUÂ  T2390Â  @ 1.86GHz stepping 0d<br
/> checking TSC synchronization [CPU#0 -&gt; CPU#1]: passed.<br
/> Brought up 2 CPUs<br
/> Total of 2 processors activated (7447.76 BogoMIPS)</code></p><p>The above shows me information about my CPU. Good to know.</p><p>The most important information you will probably get from <em>dmesg</em> is the information regarding attached USB devices. When you plug in a USB device you will need to know what special device this is attached to so you can mount it. This will occur at the bottom of the <em>dmesg</em> command output.</p><p>The output of <em>dmesg</em> is quite long and will scroll by very quickly. When I run this command I always pipe it through the <em>less</em> command like so:</p><p><em>dmesg | less</em></p><p>This way I can view the output one page at a time.</p><p><strong>/var/log</strong></p><p>This special directory is the Mac Daddy of information gathering. Fire up a terminal window and issue the command <em>ls /var/log/</em> and see what it contains. You see, included in this listing, such log files and log directories as:</p><ul><li>boot.log &#8211; boot information</li><li>cron &#8211; cron logs</li><li>cups &#8211; directory of all printing logs</li><li>httpd &#8211; Apache logs</li><li>mail &#8211; Mail server logs</li><li>maillog &#8211; The mail log</li><li>messages &#8211; Post-boot kernel information</li><li>secure &#8211; Security log</li><li>Xorg.0.log &#8211; X Server log</li></ul><p>You can see the listing of log files in the <strong>/var/log</strong> directory, but in order to actually read the log files you have to be the root user (or use sudo).</p><p><strong>Viewing with tail</strong></p><p>One of the handiest methods of viewing log files is using the <em>tail</em> command. What tail does is follow the running output of a log file. For instance if I want to follow my <strong>/var/log/secure</strong> log to watch for security issues I would enter the command <em>tail -f /var/log/secure. </em>The <em>f</em> switch tells tail to follow. IfÂ  you don&#8217;t add the <em>f</em> switch tail will just list the output all at once (as if you just issued <em>less /var/log/secure</em>.)</p><p><strong>Final Thougths</strong></p><p>There is so much information to be gained from reading log files. The Linux operating system makes reading log files easy, once you know which log file does what. Take a poke around <strong>/var/log</strong> to find out exactly what you have and where you need to look for the problem you are having.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/16/learning-linux-log-files/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> </channel> </rss>
