<?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 &#187; log files</title>
	<atom:link href="http://www.ghacks.net/tag/log-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 11:26:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache troubleshooting tips</title>
		<link>http://www.ghacks.net/2009/11/08/apache-troubleshooting-tips/</link>
		<comments>http://www.ghacks.net/2009/11/08/apache-troubleshooting-tips/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 00:21:57 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache log]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[apache2ctl]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=18266</guid>
		<description><![CDATA[How many times have you installed a LAMP server only to find Apache doesn&#8217;t seem to want to run right? Or you install a new module only to see Apache try to download pages as file, instead of displaying them on screen?
There are a hundred and one thousand things that can go wrong with any [...]]]></description>
			<content:encoded><![CDATA[<p>How many times have you installed a LAMP server only to find Apache doesn&#8217;t seem to want to run right? Or you install a new module only to see Apache try to download pages as file, instead of displaying them on screen?</p>
<p>There are a hundred and one thousand things that can go wrong with any web server installation. From a fresh installation to an installation that has been running for a long time, you never know when something is going to cause your web server to go astray. When it does happen, it&#8217;s always nice to know that, usually, Occam&#8217;s Razor applies.</p>
<p>In this tutorial you will find some advice that will help you through some of the more common issues that can pop up with an Apache web server.</p>
<p><span id="more-18266"></span><strong>Is your server actually running?</strong></p>
<p>Believe it or not, this has happened to plenty of administrators. You take the server down, do some maintenance, and when you go to check out the server you&#8217;re getting errors. The first thing you do, naturally, is check out that <strong>/etc/apache2/apache.conf</strong> file to make sure your syntax is correct. But it&#8217;s perfect! What&#8217;s up? The first thing you might want to check is to make sure the server is running. But you don&#8217;t want to just issue the command to start the server or reload the server. Instead, issue the command:</p>
<p><em>sudo /etc/init.d/apache2 status</em></p>
<p>Which should return something like:</p>
<p><em>* apache is running (pid 9751).</em></p>
<p>If not, start the server with either:</p>
<p><em>sudo /etc/init.d/apache2 start</em></p>
<p>or</p>
<p><em>sudo apache2ctl start</em></p>
<p>NOTE: If you are using a distribution like Fedora, SuSE, or Mandriva you will need to first <em>su </em>to the root user and issue the above commands WITHOUT using <em>sudo</em>.</p>
<p><strong>It&#8217;s not running and it won&#8217;t start</strong></p>
<p>Did you just make changes to your Apache configuration file? Are the changes correct? If you&#8217;re not sure, you can use the <em>apache2ctl </em>command to check the syntax of your configuration file. This is done with the command:</p>
<p><em>sudo apache2ctl configtext</em></p>
<p><em><span style="font-style: normal">The above command should report:</span></em></p>
<p><em><span style="font-style: normal">Syntax OK</span></em></p>
<p><em><strong><span style="font-style: normal"><span style="font-weight: normal">If you don&#8217;t get an OK, you will get information that points to the errors in your configuration file. </span></span></strong></em></p>
<p><em><strong><span style="font-style: normal"><span style="font-weight: normal"><strong>Apache wants to download .php files!</strong></span></span></strong></em></p>
<p><em><strong><span style="font-style: normal"><span style="font-weight: normal"><strong><span style="font-weight: normal">This is another common issue. When you add a new tool on your web server (such as Drupal), if your configuration file is set up properly, any .php file might not be displayed. Instead any attempt to view a .php file will instead have your browser trying to download the file. Why is this? Apache must be informed that certain extensions are to be displayed, not downloaded. This is done from within the Apache configuration file. Open up that file (in the Ubuntu server it will be </span>/etc/apache2/apache2.conf<span style="font-weight: normal">) and first look for the following line:</span></strong></span></span></strong></em></p>
<p><em><strong><span style="font-weight: normal"><strong><span style="font-weight: normal">DirectoryIndex index.html</span></strong></span></strong></em></p>
<p>If that file doesn&#8217;t include <em>index.php </em>nearly all sites that useÂ php will be rendered useless.</p>
<p>The second line to look for is:</p>
<p><em>AddHandler application/x-httpd-php .php</em></p>
<p>If you find this line, and it is commented out, make sure you uncomment it by removing the &#8220;#&#8221; character. If it is not there add it to the bottom of the configuration file.</p>
<p>And, as always, when you make a change to the configuration file, restart Apache.</p>
<p><strong>Know where to look for problems</strong></p>
<p>Finally, it is crucial that you know where to first turn when the above doesn&#8217;t help you out. Any time I have an issue with Apache where Occam&#8217;s Razor does not apply, the first place I turn is the log files.</p>
<p>If you look in <strong>/var/log/apache2</strong> you will find, at least, the following files:</p>
<ul>
<li><span style="background-color: #ffffff">access.log: This keeps track of any connection made to your server.</span></li>
<li><span style="background-color: #ffffff">error.log: This keeps track of any errors that occur with Apache.</span></li>
<li><span style="background-color: #ffffff">other_vhosts_access.log: This is where virtual hosts will log when the virtual host has not been prescribed its own log file.</span></li>
</ul>
<p>Of course, as your site evolves so will your available log files. Regardless of what you find in <strong>/var/log/apache2</strong>, that is where you should always first turn when you have problems. Even before you google.</p>
<p><strong>Final thoughts</strong></p>
<p>Now you should be able to handle some of the more common issues with the Apache server. And if your problem isn&#8217;t common, you also know where to turn to find clues that will lead you down the right path to correction.</p>

	Tags: <a href="http://www.ghacks.net/tag/apache/" title="apache" rel="tag">apache</a>, <a href="http://www.ghacks.net/tag/apache-log/" title="apache log" rel="tag">apache log</a>, <a href="http://www.ghacks.net/tag/apache2/" title="apache2" rel="tag">apache2</a>, <a href="http://www.ghacks.net/tag/apache2ctl/" title="apache2ctl" rel="tag">apache2ctl</a>, <a href="http://www.ghacks.net/tag/log-files/" title="log files" rel="tag">log files</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/12/28/portable-web-server/" title="Portable Web Server (December 28, 2008)">Portable Web Server</a> (8)</li>
	<li><a href="http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/" title="Local Apache Web Server Wampserver (September 17, 2009)">Local Apache Web Server Wampserver</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/" title="How to: Install a LAMP server (July 23, 2009)">How to: Install a LAMP server</a> (7)</li>
	<li><a href="http://www.ghacks.net/2007/01/31/host-your-own-webserver/" title="Host your own webserver (January 31, 2007)">Host your own webserver</a> (18)</li>
	<li><a href="http://www.ghacks.net/2009/03/29/wordpress-template-tags-you-should-know/" title="Wordpress template tags you should know (March 29, 2009)">Wordpress template tags you should know</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/11/08/apache-troubleshooting-tips/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Log Analyzer Log Viewer Pro</title>
		<link>http://www.ghacks.net/2009/07/21/log-analyzer-log-viewer-pro/</link>
		<comments>http://www.ghacks.net/2009/07/21/log-analyzer-log-viewer-pro/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 08:00:08 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[log analyzer]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[log viewer]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[portable software]]></category>
		<category><![CDATA[windows software]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=14570</guid>
		<description><![CDATA[Log Viewer Pro is a portable software program for the Microsoft Windows operating system that is able to load and display log files. Its main benefits are the low memory usage and support for log files with a size of over 4 Gigabytes. There are obviously other features and options which will be discussed in [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ghacks.net/wp-content/uploads/2009/04/microsoft_windows.jpg" alt="microsoft windows" title="microsoft windows" width="128" height="128" class="alignleft size-full wp-image-11907" />Log Viewer Pro is a portable software program for the Microsoft Windows operating system that is able to load and display log files. Its main benefits are the low memory usage and support for log files with a size of over 4 Gigabytes. There are obviously other features and options which will be discussed in the following article. Log Viewer Pro will work best with log files that store each entry in their own line. It can load pretty much any document however but loses most of its functionality when doing so.</p>
<p>It is possible to load multiple log files into the log viewer which can then be looked at and switched to in the tabbed interface on top of the application. Log Viewer Pro will automatically highlight lines that contain warnings, information or errors to make the identification easier for the user. It is possible to define additional lines that get highlighted automatically using regular expressions.</p>
<p><span id="more-14570"></span><img src="http://www.ghacks.net/wp-content/uploads/2009/07/log_analyzer-500x208.jpg" alt="log analyzer" title="log analyzer" width="500" height="208" class="alignnone size-medium wp-image-14571" /></p>
<p>The application can switch to different encodings like ANSI, OEM, Unicode LE, Unicode BE, supports line numbers, text wrapping and a search that supports basic search phrases but also regular expressions. The log files can be automatically reloaded if that is required. Another interesting feature are bookmarks which can be created to jump to specific locations in a log file.</p>
<p><img src="http://www.ghacks.net/wp-content/uploads/2009/07/log_viewer.jpg" alt="log viewer" title="log viewer" width="367" height="296" class="alignnone size-full wp-image-14572" /></p>
<p><a href="http://www.uvviewsoft.com/logviewer/">Log Viewer Pro</a> is a free for non commercial use log analyzer for the Windows operating system.</p>

	Tags: <a href="http://www.ghacks.net/tag/log/" title="log" rel="tag">log</a>, <a href="http://www.ghacks.net/tag/log-analyzer/" title="log analyzer" rel="tag">log analyzer</a>, <a href="http://www.ghacks.net/tag/log-files/" title="log files" rel="tag">log files</a>, <a href="http://www.ghacks.net/tag/log-viewer/" title="log viewer" rel="tag">log viewer</a>, <a href="http://www.ghacks.net/tag/logs/" title="logs" rel="tag">logs</a>, <a href="http://www.ghacks.net/tag/portable-software/" title="portable software" rel="tag">portable software</a>, <a href="http://www.ghacks.net/tag/windows-software/" title="windows software" rel="tag">windows software</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/11/22/skype-log-view/" title="Skype Log View (November 22, 2008)">Skype Log View</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/08/26/log-analyzer-to-search-multiple-log-files-simultaneously/" title="Log Analyzer To Search Multiple Log Files Simultaneously (August 26, 2009)">Log Analyzer To Search Multiple Log Files Simultaneously</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/09/01/youtube-video-search-is-a-barebone-youtube-downloader/" title="Youtube Video Search Is A Barebone Youtube Downloader (September 1, 2009)">Youtube Video Search Is A Barebone Youtube Downloader</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/10/21/xkcd-comic-wallpaper-changer/" title="Xkcd Comic Wallpaper Changer (October 21, 2009)">Xkcd Comic Wallpaper Changer</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/04/10/wireless-networking-software-homedale/" title="Wireless Networking Software Homedale (April 10, 2009)">Wireless Networking Software Homedale</a> (13)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/07/21/log-analyzer-log-viewer-pro/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Follow multiple log files with multitail</title>
		<link>http://www.ghacks.net/2009/06/04/follow-multiple-log-files-with-multitail/</link>
		<comments>http://www.ghacks.net/2009/06/04/follow-multiple-log-files-with-multitail/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 19:09:25 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[multitail]]></category>
		<category><![CDATA[tail]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2009/06/04/follow-multiple-log-files-with-multitail/</guid>
		<description><![CDATA[Any Linux administrator knows that watching log files is key to troubleshooting problems on a Linux system. In some troubleshooting instances it is necessary to follow more than one log file. For this you will wind up with two terminal windows open which can become a mess (when you already have a number of windows [...]]]></description>
			<content:encoded><![CDATA[<p>Any Linux administrator knows that watching log files is key to troubleshooting problems on a Linux system. In some troubleshooting instances it is necessary to follow more than one log file. For this you will wind up with two terminal windows open which can become a mess (when you already have a number of windows open.) With the multitail application it is possible to follow more than one log file in the same window. It&#8217;s a wonderful tool for anyone who has to troubleshoot a Linux machine.</p>
<p>Multitail does exactly as it sounds &#8211; it allows more than one instance of the tail command in a single window. Given that we should probably take a look at the tail command first.</p>
<p><span id="more-13306"></span><strong>Tail</strong></p>
<p>What tail does is print the output of a log file in real time. With this you can open up, say, <strong>/var/log/messages</strong> with tail and see the last ten lines of that file as they are printed.Â  This comes in very handy when you need to see the errors precisely as they happen.</p>
<p>To run the tail command on a log file (we&#8217;ll stick with our example above) you would issue the command:</p>
<p><em>tail -f /var/log/messages</em></p>
<p>You would see printed the last ten kernel buffer messages as they are added. This is very helfpul when you are plugging in a USB device and you want to find out what address the device is attached to.</p>
<p>But what if you want to view, say, <strong>/var/log/mail.err </strong>and <strong>/var/log/mail.warn</strong> together? Sure you could open up two terminals and issue the tail commands for each log file, but why do that when you can have them in the same window?</p>
<p><strong>Getting and installing multitail</strong></p>
<p>The easiest way to install multitail is to issue the command (since you&#8217;ll be working in the command line anyway):</p>
<p><em>sudo apt-get install multitail</em></p>
<p>or</p>
<p><em>yum install multitail</em></p>
<p>Once the application is installed you are ready to go (there is no configuration necessary).</p>
<p><strong>Running multitail</strong></p>
<p>The structure of the multitail command is:</p>
<p>multitail -i FIRSTLOG -i SECONDLOG</p>
<p>Where FIRSTLOG and SECONDLOG are the log files you want to follow. Sticking with the example above let&#8217;s follow mail.err and mail.info. We do this with the command:</p>
<p><em>sudo multitail -i /var/log/mail.err -i /var/log/mail.info</em></p>
<div id="attachment_13302" class="wp-caption alignleft" style="width: 310px"><a href="http://www.ghacks.net/wp-content/uploads/2009/06/multitai.png"><img class="size-medium wp-image-13302" src="http://www.ghacks.net/wp-content/uploads/2009/06/multitai-500x326.png" alt="Figure 1" width="300" height="196" /></a><p class="wp-caption-text">Figure 1</p></div>
<p>The above command will have multitail following both log files horizontally (as shown in Figure 1). At first it can be a bit disconcerting to see and follow. What you are seeing is the <strong>/var/log/mail.err</strong> file being tail&#8217;d on top and the <strong>/var/log/mail.info</strong> file being tail&#8217;d on bottom. The easiest way to discern one from the other is at the bottom of each tail is the white bar showing what file is being tail&#8217;d.</p>
<p>If you do not like the horizontal layout you can change that to a vertical layout with the <em>s</em> switch like so:</p>
<p><em>sudo multitail -s 2 -i /var/log/mail.err -i /var/log/mail.info</em></p>
<div id="attachment_13305" class="wp-caption alignright" style="width: 310px"><a href="http://www.ghacks.net/wp-content/uploads/2009/06/multitail_v.png"><img class="size-medium wp-image-13305" src="http://www.ghacks.net/wp-content/uploads/2009/06/multitail_v-500x326.png" alt="Figure 2" width="300" height="196" /></a><p class="wp-caption-text">Figure 2</p></div>
<p>When you run this version of the command the tail&#8217;s are side by side with a wide vertical bar between them (as you can see in Figure 2).</p>
<p><strong>Merging logs</strong></p>
<p>You can also use multitail to merge multiple logs into one log. This can help you when you know you need to follow the output of more than one log file but you don&#8217;t need them separated. To do this you use the <em>mergeall</em> option like so:</p>
<p><em>sudo multitail &#8211;mergeall -i /var/log/mail.err -i /var/log/mail.info</em></p>
<p><strong>Final thoughts</strong></p>
<p>Multitail is one of those tools that once you get used to having it in your toolkit you will pull it out again and again.</p>

	Tags: <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/log-files/" title="log files" rel="tag">log files</a>, <a href="http://www.ghacks.net/tag/multitail/" title="multitail" rel="tag">multitail</a>, <a href="http://www.ghacks.net/tag/tail/" title="tail" rel="tag">tail</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/16/learning-linux-log-files/" title="Learning Linux: Log Files (February 16, 2009)">Learning Linux: Log Files</a> (5)</li>
	<li><a href="http://www.ghacks.net/2009/03/13/easy-linux-log-viewing-with-log-viewer/" title="Easy Linux Log Viewing with Log Viewer (March 13, 2009)">Easy Linux Log Viewing with Log Viewer</a> (0)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
	<li><a href="http://www.ghacks.net/2006/12/07/widgets-for-linux-superkaramba/" title="Widgets for Linux: SuperKaramba (December 7, 2006)">Widgets for Linux: SuperKaramba</a> (6)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/06/04/follow-multiple-log-files-with-multitail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

	Tags: <a href="http://www.ghacks.net/tag/varlog/" title="/var/log" rel="tag">/var/log</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/log-files/" title="log files" rel="tag">log files</a>, <a href="http://www.ghacks.net/tag/log-viewer/" title="log viewer" rel="tag">log viewer</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/16/learning-linux-log-files/" title="Learning Linux: Log Files (February 16, 2009)">Learning Linux: Log Files</a> (5)</li>
	<li><a href="http://www.ghacks.net/2009/07/21/log-analyzer-log-viewer-pro/" title="Log Analyzer Log Viewer Pro (July 21, 2009)">Log Analyzer Log Viewer Pro</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/06/04/follow-multiple-log-files-with-multitail/" title="Follow multiple log files with multitail (June 4, 2009)">Follow multiple log files with multitail</a> (0)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
</ul>

]]></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>

	Tags: <a href="http://www.ghacks.net/tag/varlog/" title="/var/log" rel="tag">/var/log</a>, <a href="http://www.ghacks.net/tag/administration/" title="administration" rel="tag">administration</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/log-files/" title="log files" rel="tag">log files</a>, <a href="http://www.ghacks.net/tag/messages/" title="messages" rel="tag">messages</a>, <a href="http://www.ghacks.net/tag/security/" title="Security" rel="tag">Security</a>, <a href="http://www.ghacks.net/tag/tail/" title="tail" rel="tag">tail</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/06/04/follow-multiple-log-files-with-multitail/" title="Follow multiple log files with multitail (June 4, 2009)">Follow multiple log files with multitail</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/03/13/easy-linux-log-viewing-with-log-viewer/" title="Easy Linux Log Viewing with Log Viewer (March 13, 2009)">Easy Linux Log Viewing with Log Viewer</a> (0)</li>
	<li><a href="http://www.ghacks.net/2006/12/01/monitor-your-network-connections-with-x-netstat/" title="Monitor your network connections with X-NetStat (December 1, 2006)">Monitor your network connections with X-NetStat</a> (4)</li>
	<li><a href="http://www.ghacks.net/2006/05/03/how-to-scan-your-linux-distro-for-root-kits/" title="How to scan your Linux-Distro for Root Kits (May 3, 2006)">How to scan your Linux-Distro for Root Kits</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/04/01/help-i-use-ubuntu-and-theres-no-su/" title="Help, I Use Ubuntu and There&#8217;s No &#8220;su&#8221;! (April 1, 2009)">Help, I Use Ubuntu and There&#8217;s No &#8220;su&#8221;!</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/02/16/learning-linux-log-files/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Deal With Huge Apache Web Server Log Files</title>
		<link>http://www.ghacks.net/2008/10/01/how-to-deal-with-huge-apache-web-server-log-files/</link>
		<comments>http://www.ghacks.net/2008/10/01/how-to-deal-with-huge-apache-web-server-log-files/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 07:37:08 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[apache log analysis]]></category>
		<category><![CDATA[apache log files]]></category>
		<category><![CDATA[apache server]]></category>
		<category><![CDATA[apache web server]]></category>
		<category><![CDATA[dedicated server]]></category>
		<category><![CDATA[log file analysis]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[root server]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=7325</guid>
		<description><![CDATA[I must admit that I have not been paying attention to the size of some of the Apache web server log files on my dedicated server. For those that do not know, the Apache logs are the log files of the Apache web server. They log every hit to a website and provide excellent material [...]]]></description>
			<content:encoded><![CDATA[<p>I must admit that I have not been paying attention to the size of some of the Apache web server log files on my dedicated server. For those that do not know, the Apache logs are the log files of the Apache web server. They log every hit to a website and provide excellent material that can be processed by a log file analysis software.</p>
<p>This log files can become huge if you have a popular website. The current size of the Ghacks log file is 45 Gigabytes. If it continues growing in that pace the web server will run out of hard disk space pretty soon. </p>
<p>The first problem was to figure out how to backup the 45 Gigabyte file on the web server since I did not want to loose all the data stored within. The idea was born to compress the Apache web server log file first and then reduce it to a few Kilobytes with the echo command.</p>
<p><span id="more-7325"></span>The Apache web server log files are stored in the /var/log/apache2 directory on the Debian dedicated server. The first command to issue would compress the contents of the apache2 directory into multiple tar files if the compressed file reaches a size maximum. This makes it easier to transfer files to another computer.</p>
<p><code>tar -cz directory | split -d -b 1024m - destination.tgz</code></p>
<p>Directory is the source directory where the Apache web server log files reside and destination.tgz is the name of the to be created compressed file. It is important to note that you might need to stop the Apache web server for the operation to succeed because the compression utility will stop if files get changed during procession.</p>
<p>The last thing that is to be done is to clear the original Apache web server log files in the log files directory. This can be done with the following command even if Apache is running.</p>
<p><code>echo " " > /var/log/apache2/filename.log</code></p>
<p>This simply overwrites the contents of the file. Please note again that some Linux distributions use another directory structure and that the log files can be located in another directory on the server.<br />
This takes only a few seconds and the log file will be cleared from all contents afterwards. </p>
<p>Then it is just a matter of transferring the various compressed archives to another computer.</p>

	Tags: <a href="http://www.ghacks.net/tag/apache-log-analysis/" title="apache log analysis" rel="tag">apache log analysis</a>, <a href="http://www.ghacks.net/tag/apache-log-files/" title="apache log files" rel="tag">apache log files</a>, <a href="http://www.ghacks.net/tag/apache-server/" title="apache server" rel="tag">apache server</a>, <a href="http://www.ghacks.net/tag/apache-web-server/" title="apache web server" rel="tag">apache web server</a>, <a href="http://www.ghacks.net/tag/dedicated-server/" title="dedicated server" rel="tag">dedicated server</a>, <a href="http://www.ghacks.net/tag/log-file-analysis/" title="log file analysis" rel="tag">log file analysis</a>, <a href="http://www.ghacks.net/tag/log-files/" title="log files" rel="tag">log files</a>, <a href="http://www.ghacks.net/tag/root-server/" title="root server" rel="tag">root server</a>, <a href="http://www.ghacks.net/tag/web-server/" title="web server" rel="tag">web server</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/07/23/web-server-migration-today/" title="Web Server Migration Today (July 23, 2009)">Web Server Migration Today</a> (5)</li>
	<li><a href="http://www.ghacks.net/2008/12/28/portable-web-server/" title="Portable Web Server (December 28, 2008)">Portable Web Server</a> (8)</li>
	<li><a href="http://www.ghacks.net/2009/07/20/new-managed-server-ordered/" title="New Managed Server Ordered (July 20, 2009)">New Managed Server Ordered</a> (11)</li>
	<li><a href="http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/" title="Local Apache Web Server Wampserver (September 17, 2009)">Local Apache Web Server Wampserver</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/03/30/how-to-select-a-dedicated-server-provider/" title="How To Select A Dedicated Server Provider (March 30, 2009)">How To Select A Dedicated Server Provider</a> (14)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/10/01/how-to-deal-with-huge-apache-web-server-log-files/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Txt Collector</title>
		<link>http://www.ghacks.net/2007/09/22/txt-collector/</link>
		<comments>http://www.ghacks.net/2007/09/22/txt-collector/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 05:43:21 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[merge logs]]></category>
		<category><![CDATA[merge text]]></category>
		<category><![CDATA[readme]]></category>
		<category><![CDATA[txt collector]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2007/09/22/txt-collector/</guid>
		<description><![CDATA[If you regularly work with textfiles you might find the software Txt Collector handy. Txt Collector is basically a text file merger which can be used to merge an unlimited number of text files into one. This can be pretty useful in many ways. You could for instance combine all readme documents of applications that you use into one text file for faster (no more where was that readme again) access or combine log files for better processing.]]></description>
			<content:encoded><![CDATA[<p>If you regularly work with textfiles you might find the software Txt Collector handy. Txt Collector is basically a text file merger which can be used to merge an unlimited number of text files into one. This can be pretty useful in many ways. You could for instance combine all readme documents of applications that you use into one text file for faster (no more where was that readme again) access or combine log files for better processing.</p>
<p>Txt Collector comes with some options to make the life of the user a bit easier. It may grab all text files from one directory plus all subdirectories if desired and combine them on the fly which is great if you want to merge many text files. </p>
<p>It is furthermore possible to add separators after each text file to see the end and the beginning of new text files visually. Txt Collector supports all Microsoft operating systems starting with Windows 95 up to Windows Vista.</p>
<p><span id="more-2032"></span>Read More:</p>
<p><a href="http://bluefive.pair.com/txtcollector.htm">Txt Collector</a></p>

	Tags: <a href="http://www.ghacks.net/tag/log-files/" title="log files" rel="tag">log files</a>, <a href="http://www.ghacks.net/tag/merge-logs/" title="merge logs" rel="tag">merge logs</a>, <a href="http://www.ghacks.net/tag/merge-text/" title="merge text" rel="tag">merge text</a>, <a href="http://www.ghacks.net/tag/readme/" title="readme" rel="tag">readme</a>, <a href="http://www.ghacks.net/tag/software/" title="software" rel="tag">software</a>, <a href="http://www.ghacks.net/tag/txt-collector/" title="txt collector" rel="tag">txt collector</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/03/20/combine-text-documents/" title="Combine Text Documents (March 20, 2008)">Combine Text Documents</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/06/08/zip-repair/" title="Zip Repair (June 8, 2008)">Zip Repair</a> (3)</li>
	<li><a href="http://www.ghacks.net/2007/04/09/zip-file-recovery-with-object-fix-zip/" title="Zip File Recovery with Object Fix Zip (April 9, 2007)">Zip File Recovery with Object Fix Zip</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/07/15/zen-key-an-all-purpose-application-manager/" title="Zen Key An All Purpose Application Manager (July 15, 2008)">Zen Key An All Purpose Application Manager</a> (3)</li>
	<li><a href="http://www.ghacks.net/2008/05/13/youtube-batch-downloader/" title="Youtube Batch Downloader (May 13, 2008)">Youtube Batch Downloader</a> (13)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2007/09/22/txt-collector/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
