<?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>Javeed Abdul &#187; linux troubleshoots</title>
	<atom:link href="http://www.javeedpassion.com/tag/linux-troubleshoots/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javeedpassion.com</link>
	<description>It&#039;s not what you don&#039;t know that hurts you . It&#039;s what you think you know that&#039;s ain&#039;t so.</description>
	<lastBuildDate>Sun, 07 Feb 2010 23:42:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple Troubleshooting steps in  Linux</title>
		<link>http://www.javeedpassion.com/2010/02/simple-troubleshooting-in-linux/</link>
		<comments>http://www.javeedpassion.com/2010/02/simple-troubleshooting-in-linux/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 03:21:50 +0000</pubDate>
		<dc:creator>Javeed Abdul</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux troubleshoots]]></category>

		<guid isPermaLink="false">http://www.javeedpassion.com/?p=165</guid>
		<description><![CDATA[Hardware
Getting ram information
cat /proc/meminfo
or if you want to get just the amount of ram you can do:
cat /proc/meminfo &#124; head -n 1
Another fun thing to do with ram is actually open it up and take a peek. This next command will show you all the string (plain text) values in ram.
sudo dd if=/dev/mem &#124; cat [...]]]></description>
			<content:encoded><![CDATA[<h2>Hardware</h2>
<h3>Getting ram information</h3>
<div>cat /proc/meminfo</div>
<p>or if you want to get just the <strong>amount of ram</strong> you can do:</p>
<div>cat /proc/meminfo | head -n 1</div>
<p>Another fun thing to do with ram is actually open it up and take a peek. This next command will show you all the string (plain text) values in ram.</p>
<div>sudo dd if=/dev/mem | cat | strings</div>
<h3>Getting cpu info</h3>
<p>Sometimes in troubleshooting we want to know what processor we are dealing with along with how much cpu is currently being used by our OS and programs. We can do this with these two commands.<br />
<span id="more-165"></span></p>
<div>cat /proc/cpuinfo</div>
<div>top</div>
<p><img src="http://www.nixtutor.com/wp-content/uploads/2009/02/top.jpg" alt="Linux top command" /></p>
<h3>Check the temperature of your CPU</h3>
<p>Keeping a computer within a safe temperature is the key to maintaining a stable system.</p>
<div>cat /proc/acpi/thermal_zone/THRM/temperature</div>
<p><img src="http://www.nixtutor.com/wp-content/uploads/2009/02/tuxtemperature1.png" alt="Check Linux Temperature" /><br />
<img src="http://www.nixtutor.com/wp-content/uploads/2009/02/cat-temp.png" alt="cat linux temperature" /></p>
<h3>List PCI and USB devices</h3>
<p>To list all the PCI devices in your system issues the following command:</p>
<div>lspci</div>
<p>For USB use:</p>
<div>lsusb</div>
<h3>Check out how much hard drive space is left</h3>
<div>df -h</div>
<p><img src="http://www.nixtutor.com/wp-content/uploads/2009/02/dfh.png" alt="Linux show hard drive space" /></p>
<h3>See what hard drives are currently detected</h3>
<p>It is often times helpful to know what hard drives are connected to a system and what name was given them in the <a href="http://www.nixtutor.com/linux/understanding-the-linux-directory-layout/">Linux directory</a>.  This info allows us to mount the hard drive and manipulate it.</p>
<div>sudo fdisk -l</div>
<p><img src="http://www.nixtutor.com/wp-content/uploads/2009/02/fdisk.jpg" alt="fdisk -l" /></p>
<h2>Installed Programs</h2>
<h3>Packages</h3>
<p>Ever want to find all the packages that are installed on your system? You can find all the packages and also find out why they are on your system. You can even determine what packages depend on them if any.</p>
<p>Find all installed packages</p>
<div>dpkg –get-selections | less</div>
<p>Find out why a packages is installed and what depends on it</p>
<div>aptitude why packagename</div>
<p>Find out where the package stores all of its files</p>
<div>dpkg -L packagename</div>
<h3>Kill a process</h3>
<div>ps -A | grep ProgramName</div>
<div>kill 7207</div>
<p><img src="http://www.nixtutor.com/wp-content/uploads/2009/02/killfirefox.gif" alt="Linux kill firefox" /></p>
<h2>Miscellaneous</h2>
<h3>Go to a terminal</h3>
<div>Ctrl + Alt + f3</div>
<div>return with, Ctrl + Alt + f7</div>
<h3>Show all network connections</h3>
<p>There are many great network scanners and assessment tools available for Linux but <strong>netstat</strong> is a very easy to use often a first step in troubleshooting network issues. We will leave the rest of the network tools for a later article as there is so much to cover.</p>
<div>netstat</div>
<h3>List all files that are currently open on the system</h3>
<p>This command will allow you to see all the files that are currently open on your system. Limiting the directory or coupling this command with grep is often useful for finding files that are still open restricting the ability to unmount a device. <strong>Lsof</strong> will also ouput the process id or PID.  You can then kill the process using the <strong>kill</strong> command above.</p>
<div>lsof</div>
<h3>Keep an eye on something for awhile</h3>
<p>The watch command will repeat a command at a set interval (default 2 seconds) and output the response. This is useful for watching directories that change, watching hard drives fill up when a lot of data is being transfered, or using it with <strong>lsusb</strong> to watch for USB devices being plugged in.</p>
<div>watch ls</div>
<div>watch df -h</div>
<h3>Find where a binary is stored and its libraries</h3>
<p>Often times when running a cron command you want to include the absolute path to the command. Sometimes I run scheduled PHP tasks. This can be acomplished by using the ‘<strong>whereis</strong>‘ command.</p>
<div>whereis php5</div>
<h2>Logs</h2>
<h3>See if you have kernel boot issues</h3>
<div>dmesg | less</div>
<p>For more logs just cd into the <strong>/var/log</strong> directory and start using, <strong>cat</strong>, <strong>less</strong>, <strong>tail</strong>, <strong>grep</strong>, <strong>find</strong> or any other tool to view and search.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javeedpassion.com/2010/02/simple-troubleshooting-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
