<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>LINUXOLOGY</title>
	<atom:link href="https://redhatlinux4u.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://redhatlinux4u.wordpress.com</link>
	<description>live with the future  technology ...</description>
	<lastBuildDate>Fri, 26 Apr 2013 14:24:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='redhatlinux4u.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/d200e20dfc32490c26d749c728933e43?s=96&#038;d=https%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>LINUXOLOGY</title>
		<link>https://redhatlinux4u.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://redhatlinux4u.wordpress.com/osd.xml" title="LINUXOLOGY" />
	<atom:link rel='hub' href='https://redhatlinux4u.wordpress.com/?pushpress=hub'/>
		<item>
		<title>the Art of Linux Troubleshooting</title>
		<link>https://redhatlinux4u.wordpress.com/2013/04/26/the-art-of-linux-troubleshooting/</link>
		<comments>https://redhatlinux4u.wordpress.com/2013/04/26/the-art-of-linux-troubleshooting/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 14:21:42 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=686</guid>
		<description><![CDATA[Here are some valuable tips to help you find important system files in RHEL 5, which get deleted by accident. Everything seems fine when your Linux machine works just the way you want it to. But that feeling changes dramatically when your machine starts creating problems that you find really difficult to sort out. Not [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=686&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here are some valuable tips to help you find important system files in RHEL 5, which get deleted by accident.</p>
<p>Everything seems fine when your Linux machine works just the way you want it to. But that feeling changes dramatically when your machine starts creating problems that you find really difficult to sort out. Not everyone can troubleshoot a Linux machine efficiently but you can, if you are ready to stay with us for the next few minutes. Let’s look at what to do when some of your important system files are deleted or corrupted under Red Hat Enterprise Linux 5. The action begins now!<br />
<strong>Scene 1: /etc/passwd is deleted</strong><br />
This is an important file in Linux as it contains information about user accounts and passwords. If it’s missing in your system and you try to log in to a user account, you get an error message stating Log-in incorrect and after restarting the system.</p>
<p>Now that you have seen the problem and its consequences, it’s time to solve it. Boot into single user mode. At the start of booting, press any key to enter into the GRUB menu. Here you will see a list of the operating systems installed. Just select the one you are working with and press.</p>
<p>It’s time to have some fun with kernel parameters. So highlight the kernel and again press e to edit its parameters.<br />
Next, instruct the kernel to boot into single user mode, which is also known as maintenance mode. Just type 1 after a space and press the Enter key. Now press b to continue the booting process.<br />
Now that you have booted into single user mode, you are probably asking yourself, What is next?. The tricky portion of this exercise is now over and it takes just one command to have your passwd file in its place. Actually, there is a file /etc/passwd-, which is nothing but the backup file for /etc/passwd. So all you need to do is to issue the following command:</p>
<p>cp /etc/passwd- /etc/passwd</p>
<p>and you are done. Now you can issue the init 5 command to switch to the graphical mode. Everything is fine now. You can also find the backup of /etc/shadow and /etc/gshadow as /etc/shadow- and /etc/gshadow- respectively.<br />
<strong>Scene 2: /etc/pam.d/login is deleted</strong><br />
If your /etc/pam.d/login file is deleted and you try to log in, it won’t ask you to enter your password after entering your username. Instead, it will continuously show the localhost login prompt. Here again, there is a single command that will solve the problem for you:</p>
<p>cp /etc/pam.d/system-auth /etc/pam.d/login</p>
<p>Just boot into the single user mode as done earlier, type this command and you’ll be able to log in normally. There is also a second solution to this problem, which we’ll look at after a while.<br />
<strong>Scene 3: /etc/inittab is deleted</strong><br />
We know that in Linux, init is the first process to be started and it starts all the other processes. The /etc/inittab file contains instructions for the init process and if it’s missing, then no further process can be launched. On starting a system with no inittab file, it will show the following message:</p>
<p>INIT:No inittab file found and will ask you to enter a runlevel. When you do that, it again shows the message that no more processes are left in this runlevel.<br />
Fixing this problem is not easy because being in the single user mode doesnt help in this case. Here, you need the Linux rescue environment to fix this problem. So set your first boot device to CD and boot with the RHEL5 CD. At the boot prompt, type Linux rescue to enter the rescue environment.<br />
Once you have entered into the rescue environment, your system will be mounted under /mnt/sysimage. Here, reinstall the package that provides the /etc/inittab file. The overall process is given below:<br />
chroot /mnt/sysimage<br />
rpm -q &#8211;whatprovides /etc/inittab<br />
mkdir /a<br />
mount /dev/hdc /a</p>
<p>Here /dev/hdc is the path of the CD. It may vary on your system, though.</p>
<p>rpm Uvh &#8211;force /a/Server/initscripts-8.45.25-1.el5.i386.rpm</p>
<p>You can also hit the Tab key after init to auto complete the name.<br />
Now you’ll get your /etc/inittab file back. The same procedure can be applied to recover the /etc/pam.d/login file. In this case, youll have to install the util-linux package. Once you are done with it, type Exit to leave the rescue environment, set your first boot device to hard disk and boot normally.</p>
<p><strong>Scene 4: /boot/grub/grub.conf is deleted</strong></p>
<p>This file is the configuration file of the GRUB boot loader. If it is deleted and you start your machine, you will see a GRUB prompt that indicates that grub.conf is missing and there is no further instruction for GRUB to carry on its operation.<br />
But don’t worry, as we’ll solve this problem, too, in the next few minutes. You don’t even need to enter single user mode or the Linux rescue environment for this. At the GRUB prompt, you can enter some command that can make your system boot. So here we go: Type root (and hit Tab to find out the hard disks attached to the system. In my case, I got hd0 and fd0the hard disk and floppy disk, respectively). Now we know that GRUB is stored in the first sector of a hard disk, which is hd0,0. So the complete command would be root (hd0,0). Enter this command and press the Enter key to carry on.<br />
You now need to find out the kernel image file. So enter kernel /v and hit Tab to auto complete it. In my system, it’s vmlinuz-2.6.18-128.el5. Please note it down as we’ll require this information further, and then press Enter.<br />
Next, lets figure out the initrd image file. So enter initrd /i and press Tab to auto complete it. For me, its initrd-2.6.18-128.el5.img. Again note it down and press Enter.<br />
Type boot and press Enter, and the system will boot normally.<br />
Now it’s time to create a grub.conf file manually. So create the /boot/grub/grub.conf file and enter the following data in it:</p>
<p>splashimage=(hd0,0)/grub/splash.xpm.gz<br />
default=0<br />
timeout=5<br />
title Red Hat<br />
root (hd0,0)<br />
kernel /vmlinuz-2.6.18-128.el5<br />
initrd /initrd-26.18-128.el5.img</p>
<p>Save the file and quit it. You have created a grub.conf file manually to resolve the problem. Don’t forget that the kernel and the initrd image file name may vary on your system. That’s why I asked you to note them down earlier. You can also find them in the /boot folder once you are logged in it’s not a big issue.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/686/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=686&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2013/04/26/the-art-of-linux-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux System Monitoring Tools Every SysAdmin Should Know</title>
		<link>https://redhatlinux4u.wordpress.com/2013/04/24/linux-system-monitoring-tools-every-sysadmin-should-know/</link>
		<comments>https://redhatlinux4u.wordpress.com/2013/04/24/linux-system-monitoring-tools-every-sysadmin-should-know/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 07:10:15 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=682</guid>
		<description><![CDATA[Need to monitor Linux server performance? Try these built-in commands and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=682&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">Need to monitor Linux server performance? Try these built-in commands and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed below are some of the most basic commands when it comes to system analysis and debugging server issues such as:</p>
<ol>
<li>Finding out bottlenecks.</li>
<li>Disk (storage) bottlenecks.</li>
<li>CPU and memory bottlenecks.</li>
<li>Network bottlenecks.</li>
</ol>
<p><a name="1"></a></p>
<h2>#1: top &#8211; Process Activity Command</h2>
<p>The top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds.</p>
<div class="wp-caption aligncenter" id="attachment_5179" style="width:279px;"><img class="size-medium wp-image-5179" title="Fig.01: Linux top command" alt="Fig.01: Linux top command" src="http://files.cyberciti.biz/uploads/tips/2009/06/top-output-269x300.png" width="269" height="300" /></p>
<p class="wp-caption-text">Fig.01: Linux top command</p>
</div>
<h3>Commonly Used Hot Keys</h3>
<p>The top command provides several useful hot keys:</p>
<table border="0">
<tbody>
<tr>
<th><a class="zem_slink" title="Keyboard shortcut" href="http://en.wikipedia.org/wiki/Keyboard_shortcut" target="_blank" rel="wikipedia">Hot Key</a></th>
<th>Usage</th>
</tr>
<tr>
<td>t</td>
<td>Displays summary information off and on.</td>
</tr>
<tr>
<td>m</td>
<td>Displays memory information off and on.</td>
</tr>
<tr>
<td>A</td>
<td>Sorts the display by top consumers of various system resources. Useful for quick identification of performance-hungry tasks on a system.</td>
</tr>
<tr>
<td>f</td>
<td>Enters an interactive configuration screen for top. Helpful for setting up top for a specific task.</td>
</tr>
<tr>
<td>o</td>
<td>Enables you to interactively select the ordering within top.</td>
</tr>
<tr>
<td>r</td>
<td>Issues renice command.</td>
</tr>
<tr>
<td>k</td>
<td>Issues kill command.</td>
</tr>
<tr>
<td>z</td>
<td>Turn on or off color/mono</td>
</tr>
</tbody>
</table>
<p><a name="2"></a></p>
<h2>#2: <a class="zem_slink" title="Vmstat" href="http://en.wikipedia.org/wiki/Vmstat" target="_blank" rel="wikipedia">vmstat</a> &#8211; System Activity, Hardware and System Information</h2>
<p>The command vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.<br />
<code># vmstat 3</code><br />
Sample Outputs:</p>
<pre>procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 2540988 522188 5130400    0    0     2    32    4    2  4  1 96  0  0
 1  0      0 2540988 522188 5130400    0    0     0   720 1199  665  1  0 99  0  0
 0  0      0 2540956 522188 5130400    0    0     0     0 1151 1569  4  1 95  0  0
 0  0      0 2540956 522188 5130500    0    0     0     6 1117  439  1  0 99  0  0
 0  0      0 2540940 522188 5130512    0    0     0   536 1189  932  1  0 98  0  0
 0  0      0 2538444 522188 5130588    0    0     0     0 1187 1417  4  1 96  0  0
 0  0      0 2490060 522188 5130640    0    0     0    18 1253 1123  5  1 94  0  0</pre>
<h3><a class="zem_slink" title="Framebuffer" href="http://en.wikipedia.org/wiki/Framebuffer" target="_blank" rel="wikipedia">Display Memory</a> Utilization Slabinfo</h3>
<p><code># vmstat -m</code></p>
<h3>Get Information About Active / Inactive Memory Pages</h3>
<p><code># vmstat -a</code><br />
<strong></strong></p>
<p><a name="3"></a></p>
<h2>#3: w &#8211; Find Out Who Is Logged on And What They Are Doing</h2>
<p>w command displays information about the users currently on the machine, and their processes.<br />
<code># w username<br />
# w vivek</code><br />
Sample Outputs:</p>
<pre> 17:58:47 up 5 days, 20:28,  2 users,  load average: 0.36, 0.26, 0.24
<a class="zem_slink" title="User (computing)" href="http://en.wikipedia.org/wiki/User_%28computing%29" target="_blank" rel="wikipedia">USER</a>     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    10.1.3.145       14:55    5.00s  0.04s  0.02s vim /etc/resolv.conf
root     pts/1    10.1.3.145       17:43    0.00s  0.03s  0.00s w</pre>
<p><a name="4"></a></p>
<h3>#4: uptime &#8211; Tell How Long The System Has Been Running</h3>
<p>The uptime command can be used to see how long the server has been running. The current time, how long the system has been running, how many users are currently logged on, and the system <a class="zem_slink" title="Load (computing)" href="http://en.wikipedia.org/wiki/Load_%28computing%29" target="_blank" rel="wikipedia">load averages</a> for the past 1, 5, and 15 minutes.<br />
<code># uptime</code><br />
Output:</p>
<pre> 18:02:41 up 41 days, 23:42,  1 user,  load average: 0.00, 0.00, 0.00</pre>
<p>1 can be considered as optimal load value. The load can change from system to system. For a single CPU system 1 &#8211; 3 and SMP systems 6-10 load value might be acceptable.</p>
<p><a name="5"></a></p>
<h2>#5: ps &#8211; Displays The Processes</h2>
<p>ps command will report a snapshot of the current processes. To select all processes use the -A or -e option:<br />
<code># ps -A</code><br />
Sample Outputs:</p>
<pre>  PID TTY          TIME CMD
    1 ?        00:00:02 init
    2 ?        00:00:02 migration/0
    3 ?        00:00:01 ksoftirqd/0
    4 ?        00:00:00 watchdog/0
    5 ?        00:00:00 migration/1
    6 ?        00:00:15 ksoftirqd/1
....
.....
 4881 ?        00:53:28 java
 4885 tty1     00:00:00 mingetty
 4886 tty2     00:00:00 mingetty
 4887 tty3     00:00:00 mingetty
 4888 tty4     00:00:00 mingetty
 4891 tty5     00:00:00 mingetty
 4892 tty6     00:00:00 mingetty
 4893 ttyS1    00:00:00 agetty
12853 ?        00:00:00 cifsoplockd
12854 ?        00:00:00 cifsdnotifyd
14231 ?        00:10:34 lighttpd
14232 ?        00:00:00 php-cgi
54981 pts/0    00:00:00 vim
55465 ?        00:00:00 php-cgi
55546 ?        00:00:00 bind9-snmp-stat
55704 pts/1    00:00:00 ps</pre>
<p>ps is just like top but provides more information.</p>
<h3>Show Long Format Output</h3>
<p><code># ps -Al</code><br />
To turn on extra full mode (it will show <a class="zem_slink" title="Command-line interface" href="http://en.wikipedia.org/wiki/Command-line_interface" target="_blank" rel="wikipedia">command line arguments</a> passed to process):<br />
<code># ps -AlF</code></p>
<h3>To See Threads ( LWP and NLWP)</h3>
<p><code># ps -AlFH</code></p>
<h3>To See Threads After Processes</h3>
<p><code># ps -AlLm</code></p>
<h3>Print All Process On The Server</h3>
<p><code># ps ax<br />
# ps axu</code></p>
<h3>Print A Process Tree</h3>
<p><code># ps -ejH<br />
# ps axjf<br />
# pstree</code></p>
<h3>Print Security Information</h3>
<p><code># ps -eo euser,ruser,suser,fuser,f,comm,label<br />
# ps axZ<br />
# ps -eM</code></p>
<h3>See Every Process Running As User <a class="zem_slink" title="Vivek" href="http://en.wikipedia.org/wiki/Vivek" target="_blank" rel="wikipedia">Vivek</a></h3>
<p><code># ps -U vivek -u vivek u</code></p>
<h3>Set Output In a User-Defined Format</h3>
<p><code># ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm<br />
# ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm<br />
# ps -eopid,tt,user,fname,tmout,f,wchan</code></p>
<h3>Display Only The Process IDs of <a class="zem_slink" title="Lighttpd" href="http://www.lighttpd.net" target="_blank" rel="homepage">Lighttpd</a></h3>
<p><code># ps -C lighttpd -o pid=</code><br />
OR<br />
<code># pgrep lighttpd</code><br />
OR<br />
<code># pgrep -u vivek php-cgi</code></p>
<h3>Display The Name of PID 55977</h3>
<p><code># ps -p 55977 -o comm=</code></p>
<h3>Find Out The Top 10 Memory Consuming Process</h3>
<p><code># ps -auxf | sort -nr -k 4 | head -10</code></p>
<h3>Find Out top 10 CPU Consuming Process</h3>
<p><code># ps -auxf | sort -nr -k 3 | head -10</code></p>
<p><a name="6"></a></p>
<h2>#6: free &#8211; Memory Usage</h2>
<p>The command free displays the total amount of free and used physical and <a class="zem_slink" title="Paging" href="http://en.wikipedia.org/wiki/Paging" target="_blank" rel="wikipedia">swap memory</a> in the system, as well as the buffers used by the kernel.<br />
<code># free </code><br />
Sample Output:</p>
<pre>            total       used       free     shared    buffers     cached
Mem:      12302896    9739664    2563232          0     523124    5154740
-/+ buffers/cache:    4061800    8241096
Swap:      1052248          0    1052248</pre>
<p><strong><span style="color:#003366;"> </span></strong></p>
<h2>#7: iostat &#8211; Average CPU Load, Disk Activity</h2>
<p>The command iostat report <a class="zem_slink" title="Central processing unit" href="http://en.wikipedia.org/wiki/Central_processing_unit" target="_blank" rel="wikipedia">Central Processing Unit</a> (CPU) statistics and input/output statistics for devices, partitions and network filesystems (NFS).<br />
<code># iostat </code><br />
Sample Outputs:</p>
<pre>Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in) 	06/26/2009
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3.50    0.09    0.51    0.03    0.00   95.86
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda              22.04        31.88       512.03   16193351  260102868
sda1              0.00         0.00         0.00       2166        180
sda2             22.04        31.87       512.03   16189010  260102688
sda3              0.00         0.00         0.00       1615          0</pre>
<p><strong><span style="color:#003366;"> </span></strong></p>
<h2>#8: sar &#8211; Collect and Report System Activity</h2>
<p>The sar command is used to collect, report, and save system activity information. To see network counter, enter:<br />
<code># sar -n DEV | more</code><br />
To display the network counters from the 24th:<br />
<code># sar -n DEV -f /var/log/sa/sa24 | more</code><br />
You can also display real time usage using sar:<br />
<code># sar 4 5</code><br />
Sample Outputs:</p>
<pre>Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in) 		06/26/2009
06:45:12 PM       CPU     %user     %nice   %system   %iowait    %steal     %idle
06:45:16 PM       all      2.00      0.00      0.22      0.00      0.00     97.78
06:45:20 PM       all      2.07      0.00      0.38      0.03      0.00     97.52
06:45:24 PM       all      0.94      0.00      0.28      0.00      0.00     98.78
06:45:28 PM       all      1.56      0.00      0.22      0.00      0.00     98.22
06:45:32 PM       all      3.53      0.00      0.25      0.03      0.00     96.19
Average:          all      2.02      0.00      0.27      0.01      0.00     97.70</pre>
<p><strong><span style="color:#003366;"> </span></strong></p>
<h2>#9: mpstat &#8211; Multiprocessor Usage</h2>
<p>The mpstat command displays activities for each available processor, processor 0 being the first one. mpstat -P ALL to display average CPU utilization per processor:<br />
<code># mpstat -P ALL</code><br />
Sample Output:</p>
<pre>Linux 2.6.18-128.1.14.el5 (www03.nixcraft.in)	 	06/26/2009
06:48:11 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
06:48:11 PM  all    3.50    0.09    0.34    0.03    0.01    0.17    0.00   95.86   1218.04
06:48:11 PM    0    3.44    0.08    0.31    0.02    0.00    0.12    0.00   96.04   1000.31
06:48:11 PM    1    3.10    0.08    0.32    0.09    0.02    0.11    0.00   96.28     34.93
06:48:11 PM    2    4.16    0.11    0.36    0.02    0.00    0.11    0.00   95.25      0.00
06:48:11 PM    3    3.77    0.11    0.38    0.03    0.01    0.24    0.00   95.46     44.80
06:48:11 PM    4    2.96    0.07    0.29    0.04    0.02    0.10    0.00   96.52     25.91
06:48:11 PM    5    3.26    0.08    0.28    0.03    0.01    0.10    0.00   96.23     14.98
06:48:11 PM    6    4.00    0.10    0.34    0.01    0.00    0.13    0.00   95.42      3.75
06:48:11 PM    7    3.30    0.11    0.39    0.03    0.01    0.46    0.00   95.69     76.89</pre>
<p><strong><span style="color:#003366;"> </span></strong></p>
<h2>#10: pmap &#8211; Process Memory Usage</h2>
<p>The command pmap report memory map of a process. Use this command to find out causes of memory bottlenecks.<br />
<code># pmap -d PID</code><br />
To display process memory information for pid # 47394, enter:<br />
<code># pmap -d 47394</code><br />
Sample Outputs:</p>
<pre>47394:   /usr/bin/php-cgi
Address           Kbytes Mode  Offset           Device    Mapping
0000000000400000    2584 r-x-- 0000000000000000 008:00002 php-cgi
0000000000886000     140 rw--- 0000000000286000 008:00002 php-cgi
00000000008a9000      52 rw--- 00000000008a9000 000:00000   [ anon ]
0000000000aa8000      76 rw--- 00000000002a8000 008:00002 php-cgi
000000000f678000    1980 rw--- 000000000f678000 000:00000   [ anon ]
000000314a600000     112 r-x-- 0000000000000000 008:00002 ld-2.5.so
000000314a81b000       4 r---- 000000000001b000 008:00002 ld-2.5.so
000000314a81c000       4 rw--- 000000000001c000 008:00002 ld-2.5.so
000000314aa00000    1328 r-x-- 0000000000000000 008:00002 libc-2.5.so
000000314ab4c000    2048 ----- 000000000014c000 008:00002 libc-2.5.so
.....
......
..
00002af8d48fd000       4 rw--- 0000000000006000 008:00002 xsl.so
00002af8d490c000      40 r-x-- 0000000000000000 008:00002 libnss_files-2.5.so
00002af8d4916000    2044 ----- 000000000000a000 008:00002 libnss_files-2.5.so
00002af8d4b15000       4 r---- 0000000000009000 008:00002 libnss_files-2.5.so
00002af8d4b16000       4 rw--- 000000000000a000 008:00002 libnss_files-2.5.so
00002af8d4b17000  768000 rw-s- 0000000000000000 000:00009 zero (deleted)
00007fffc95fe000      84 rw--- 00007ffffffea000 000:00000   [ stack ]
ffffffffff600000    8192 ----- 0000000000000000 000:00000   [ anon ]
mapped: 933712K    writeable/private: 4304K    shared: 768000K</pre>
<p>The last line is very important:</p>
<ul>
<li><strong>mapped: 933712K</strong> total amount of memory mapped to files</li>
<li><strong>writeable/private: 4304K</strong> the amount of private address space</li>
<li><strong>shared: 768000K</strong> the amount of address space this process is sharing with others</li>
</ul>
<p><strong><span style="color:#003366;"> </span></strong></p>
<h2>#11 and #12: netstat and ss &#8211; Network Statistics</h2>
<p>The command netstat displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. ss command is used to dump socket statistics. It allows showing information similar to netstat.</p>
<h2>#13: iptraf &#8211; Real-time Network Statistics</h2>
<p>The iptraf command is interactive colorful IP LAN monitor. It is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. It can provide the following info in easy to read format:</p>
<ul>
<li>Network traffic statistics by TCP connection</li>
<li>IP traffic statistics by network interface</li>
<li>Network traffic statistics by protocol</li>
<li>Network traffic statistics by TCP/UDP port and by packet size</li>
<li>Network traffic statistics by Layer2 address</li>
</ul>
<div class="wp-caption aligncenter" id="attachment_5196" style="width:610px;"><img class="size-full wp-image-5196" title="Fig.02: General interface statistics: IP traffic statistics by network interface " alt="Fig.02: General interface statistics: IP traffic statistics by network interface " src="http://files.cyberciti.biz/uploads/tips/2009/06/iptraf3.png" width="600" height="347" /></p>
<p class="wp-caption-text">Fig.02: General interface statistics: IP traffic statistics by network interface</p>
</div>
<div class="wp-caption aligncenter" id="attachment_5195" style="width:610px;"><img class="size-full wp-image-5195" title="Fig.03 Network traffic statistics by TCP connection" alt="Fig.03 Network traffic statistics by TCP connection" src="http://files.cyberciti.biz/uploads/tips/2009/06/iptraf2.png" width="600" height="416" /></p>
<p class="wp-caption-text">Fig.03 Network traffic statistics by TCP connection</p>
</div>
<p><a name="14"></a></p>
<h2>#14: tcpdump &#8211; Detailed Network Traffic Analysis</h2>
<p>The tcpdump is simple command that dump traffic on a network. However, you need good understanding of TCP/IP protocol to utilize this tool. For.e.g to display traffic info about DNS, enter:<br />
<code># tcpdump -i eth1 'udp port 53'</code><br />
To display all IPv4 HTTP packets to and from port 80, i.e. print only packets that contain data, not, for example, SYN and FIN packets and ACK-only packets, enter:<br />
<code># tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&amp;0xf)&lt;&lt;2)) - ((tcp[12]&amp;0xf0)&gt;&gt;2)) != 0)'</code><br />
To display all FTP session to 202.54.1.5, enter:<br />
<code># tcpdump -i eth1 'dst 202.54.1.5 and (port 21 or 20'</code><br />
To display all HTTP session to 192.168.1.5:<br />
<code># tcpdump -ni eth0 'dst 192.168.1.5 and tcp and port http'</code><br />
Use wireshark to view detailed information about files, enter:<br />
<code># tcpdump -n -i eth1 -s 0 -w output.txt src or dst port 80</code></p>
<p><a name="15"></a></p>
<h2>#15: strace &#8211; System Calls</h2>
<p>Trace system calls and signals. This is useful for debugging webserver and other server problems. See how to use to trace the process and see What it is doing.</p>
<p><a name="16"></a></p>
<h2>#16: /Proc file system &#8211; Various Kernel Statistics</h2>
<p>/proc file system provides detailed information about various hardware devices and other Linux kernel information.</p>
<p>Common /proc examples:<br />
<code># cat /proc/cpuinfo<br />
# cat /proc/meminfo<br />
# cat /proc/zoneinfo<br />
# cat /proc/mounts</code></p>
<p><a name="17"></a></p>
<h2>17#: <a href="http://redhatlinux4u.wordpress.com/network-administration/nagios-local-installaion/" target="_blank">Nagios</a> &#8211; Server And Network Monitoring</h2>
<p><a href="http://www.nagios.org/" target="_blank">Nagios</a> is a popular open source computer system and network monitoring application software. You can easily monitor all your hosts, network equipment and services. It can send alert when things go wrong and again when they get better. FAN is &#8220;Fully Automated Nagios&#8221;. FAN goals are to provide a Nagios installation including most tools provided by the Nagios Community. FAN provides a CDRom image in the standard ISO format, making it easy to easilly install a Nagios server. Added to this, a wide bunch of tools are including to the distribution, in order to improve the user experience around Nagios.</p>
<p><a name="18"></a></p>
<h2>18#: Cacti &#8211; Web-based Monitoring Tool</h2>
<p>Cacti is a complete network graphing solution designed to harness the power of RRDTool&#8217;s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices. It can provide data about network, CPU, memory, logged in users, Apache, DNS servers and much more.</p>
<p><a name="19"></a></p>
<h2>#19: KDE System Guard &#8211; Real-time Systems Reporting and Graphing</h2>
<p>KSysguard is a network enabled task and system monitor application for KDE desktop. This tool can be run over ssh session. It provides lots of features such as a client/server architecture that enables monitoring of local and remote hosts. The graphical front end uses so-called sensors to retrieve the information it displays. A sensor can return simple values or more complex information like tables. For each type of information, one or more displays are provided. Displays are organized in worksheets that can be saved and loaded independently from each other. So, KSysguard is not only a simple task manager but also a very powerful tool to control large server farms.</p>
<div class="wp-caption aligncenter" id="attachment_5215" style="width:610px;"><img class="size-full wp-image-5215" title="Fig.05 KDE System Guard KDE task manager and performance monitor." alt="Fig.05 KDE System Guard" src="http://files.cyberciti.biz/uploads/tips/2009/06/kde-systemguard-screenshot.png" width="600" height="462" /></p>
<p class="wp-caption-text">Fig.05 KDE System Guard {Image credit: Wikipedia}</p>
</div>
<h2>#20: Gnome System Monitor &#8211; Real-time Systems Reporting and Graphing</h2>
<p>The System Monitor application enables you to display basic system information and monitor system processes, usage of system resources, and file systems. You can also use System Monitor to modify the behavior of your system. Although not as powerful as the KDE System Guard, it provides the basic information which may be useful for new users:</p>
<ul>
<li>Displays various basic information about the computer&#8217;s hardware and software.</li>
<li>Linux Kernel version</li>
<li>GNOME version</li>
<li>Hardware</li>
<li>Installed memory</li>
<li>Processors and speeds</li>
<li>System Status</li>
<li>Currently available disk space</li>
<li>Processes</li>
<li>Memory and swap space</li>
<li>Network usage</li>
<li>File Systems</li>
<li>Lists all mounted filesystems along with basic information about each.</li>
</ul>
<div class="wp-caption aligncenter" id="attachment_5220" style="width:610px;"><img class="size-full wp-image-5220" title="Fig.06 The Gnome System Monitor application" alt="Fig.06 The Gnome System Monitor application" src="http://files.cyberciti.biz/uploads/tips/2009/06/gnome-system-monitor.png" width="600" height="451" /></p>
<p class="wp-caption-text">Fig.06 The Gnome System Monitor application</p>
</div>
<h2>Bonus: Additional Tools</h2>
<p>A few more tools:</p>
<ul>
<li><a href="http://www.cyberciti.biz/tips/linux-scanning-network-for-open-ports.html">nmap</a> &#8211; scan your server for open ports.</li>
<li><a href="http://www.cyberciti.biz/tips/tag/lsof-command">lsof</a> &#8211; list open files, network connections and much more.</li>
<li><a title="Debian / Ubuntu Linux Install ntop To See Network Usage / Network Status" href="http://www.cyberciti.biz/faq/debian-ubuntu-install-ntop-network-traffic-monitoring-software/">ntop</a> web based tool &#8211; ntop is the best tool to see network usage in a way similar to what top command does for processes i.e. it is network traffic monitoring software. You can see network status, protocol wise distribution of traffic for UDP, TCP, DNS, HTTP and other protocols.</li>
<li><a href="http://conky.sourceforge.net/" target="_blank">Conky</a> &#8211; Another good monitoring tool for the X Window System. It is highly configurable and is able to monitor many system variables including the status of the CPU, memory, swap space, disk storage, temperatures, processes, network interfaces, battery power, system messages, e-mail inboxes etc.</li>
<li><a href="http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html" target="_blank">GKrellM</a> &#8211; It can be used to monitor the status of CPUs, main memory, hard disks, network interfaces, local and remote mailboxes, and many other things.</li>
<li><a href="http://www.cyberciti.biz/tips/keeping-a-log-of-daily-network-traffic-for-adsl-or-dedicated-remote-linux-box.html">vnstat</a> &#8211; vnStat is a console-based network traffic monitor. It keeps a log of hourly, daily and monthly network traffic for the selected interface(s).</li>
<li><a href="http://htop.sourceforge.net/" target="_blank">htop</a> &#8211; htop is an enhanced version of top, the interactive process viewer, which can display the list of processes in a tree form.</li>
<li><a href="http://www.cyberciti.biz/tips/finding-out-a-bad-or-simply-overloaded-network-link-with-linuxunix-oses.html">mtr</a> &#8211; mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.</li>
</ul>
<p>Did I miss something? Please add your favorite system motoring tool in the comments.</p>
<div id="comments">
<dl id="comment_list">
<dd class="comment odd alt thread-odd thread-alt depth-1 parent">
<dl class="children">
<dd class="comment even depth-2 parent">
<dl class="children">
<dd class="comment odd alt depth-3">
<div class="format_text" id="comment-body-172850">
<p class="reply"><a class="comment-reply-link" href="/tips/top-linux-monitoring-tools.html?replytocom=172850#respond"> </a></p>
</div>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/682/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/682/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=682&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2013/04/24/linux-system-monitoring-tools-every-sysadmin-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>

		<media:content url="http://files.cyberciti.biz/uploads/tips/2009/06/top-output-269x300.png" medium="image">
			<media:title type="html">Fig.01: Linux top command</media:title>
		</media:content>

		<media:content url="http://files.cyberciti.biz/uploads/tips/2009/06/iptraf3.png" medium="image">
			<media:title type="html">Fig.02: General interface statistics: IP traffic statistics by network interface </media:title>
		</media:content>

		<media:content url="http://files.cyberciti.biz/uploads/tips/2009/06/iptraf2.png" medium="image">
			<media:title type="html">Fig.03 Network traffic statistics by TCP connection</media:title>
		</media:content>

		<media:content url="http://files.cyberciti.biz/uploads/tips/2009/06/kde-systemguard-screenshot.png" medium="image">
			<media:title type="html">Fig.05 KDE System Guard KDE task manager and performance monitor.</media:title>
		</media:content>

		<media:content url="http://files.cyberciti.biz/uploads/tips/2009/06/gnome-system-monitor.png" medium="image">
			<media:title type="html">Fig.06 The Gnome System Monitor application</media:title>
		</media:content>
	</item>
		<item>
		<title>8 Deadly Commands</title>
		<link>https://redhatlinux4u.wordpress.com/2013/04/21/8-deadly-commands/</link>
		<comments>https://redhatlinux4u.wordpress.com/2013/04/21/8-deadly-commands/#comments</comments>
		<pubDate>Sun, 21 Apr 2013 12:55:09 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=671</guid>
		<description><![CDATA[Linux’s terminal commands are powerful, and Linux won’t ask you for confirmation if you run a command that won’t break your system. It’s not uncommon to see trolls online recommending new Linux users run these commands as a joke. Learning the commands you shouldn’t run can help protect you from trolls while increasing your understanding [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=671&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;"><a class="zem_slink" title="Linux" href="http://en.wikipedia.org/wiki/Linux" target="_blank" rel="wikipedia">Linux</a>’s terminal commands are powerful, and Linux won’t ask you for confirmation if you run a command that won’t break your system. It’s not uncommon to see trolls online recommending new Linux users run these commands as a joke.</p>
<p style="text-align:justify;">Learning the commands you shouldn’t run can help protect you from trolls while increasing your understanding of how Linux works. This isn’t an exhaustive guide, and the commands here can be remixed in a variety of ways.</p>
<p style="text-align:justify;">Note that many of these commands will only be dangerous if they’re prefixed with <strong>sudo</strong> on Ubuntu – they won’t work otherwise. On other Linux distributions, most commands must be run as root.</p>
<h3 style="text-align:justify;"> <img src='https://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> ){ <img src='https://s0.wp.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> : &amp; };: – <a class="zem_slink" title="Fork bomb" href="http://en.wikipedia.org/wiki/Fork_bomb" target="_blank" rel="wikipedia">Fork Bomb</a></h3>
<p style="text-align:justify;">The following line is a simple-looking, but dangerous, bash function:</p>
<blockquote><p> <img src='https://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> ){ <img src='https://s0.wp.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> : &amp; };:</p></blockquote>
<p style="text-align:justify;">This short line defines a shell function that creates new copies of itself. The process continually replicates itself, and its copies continually replicate themselves, quickly taking up all your <a class="zem_slink" title="CPU time" href="http://en.wikipedia.org/wiki/CPU_time" target="_blank" rel="wikipedia">CPU time</a> and memory. This can cause your computer to freeze. It’s basically a denial-of-service attack.</p>
<p style="text-align:justify;"><strong><a class="zem_slink" title="The Lesson" href="http://en.wikipedia.org/wiki/The_Lesson" target="_blank" rel="wikipedia">The Lesson</a>:</strong> Bash functions are powerful, even very short ones.</p>
<p style="text-align:justify;"><span class="lazyLoaderWrap" style="width:650px;height:402px;"> </span></p>
<h3 style="text-align:justify;">mkfs.ext4 /dev/sda1 – Formats a Hard Drive</h3>
<p style="text-align:justify;">The <strong>mkfs.ext4 /dev/sda1 </strong>command is simple to understand:</p>
<blockquote><p><strong>mkfs.ext4</strong> – Create a new ext4 file system on the following device.</p>
<p><strong>/dev/sda1</strong> – Specifies the first partition on the first hard drive, which is probably in use.</p></blockquote>
<p style="text-align:justify;">Taken together, this command can be equivalent to running format c: on Windows – it will wipe the files on your first partition and replace them with a new file system.</p>
<p style="text-align:justify;">This command can come in other forms as well –<strong> mkfs.ext3 /dev/sdb2</strong> would format the second partition on the second hard drive with the ext3 file system.</p>
<p style="text-align:justify;"><strong>The Lesson:</strong> Beware running commands directly on hard disk devices that begin with /dev/sd.</p>
<h3 style="text-align:justify;">command &gt; <a class="zem_slink" title="Device file" href="http://en.wikipedia.org/wiki/Device_file" target="_blank" rel="wikipedia">/dev/sda</a> – Writes Directly to a Hard Drive</h3>
<p style="text-align:justify;">The <strong>command &gt; /dev/sda</strong> line works similarly – it runs a command and sends the output of that command directly to your first hard drive, writing the data directly to the <a class="zem_slink" title="Hard disk drive" href="http://en.wikipedia.org/wiki/Hard_disk_drive" target="_blank" rel="wikipedia">hard disk drive</a> and damaging your file system.</p>
<blockquote><p><strong>command</strong> – <a class="zem_slink" title="Run command" href="http://en.wikipedia.org/wiki/Run_command" target="_blank" rel="wikipedia">Run</a> a command (can be any command.)</p>
<p><strong>&gt;</strong> – Send the output of the command to the following location.</p>
<p><strong>/dev/sda</strong> – Write the output of the command directly to the hard disk device.</p></blockquote>
<p style="text-align:justify;"><strong>The Lesson:</strong> As above, beware running commands that involve hard disk devices beginning with /dev/sd.</p>
<h3 style="text-align:justify;">dd if=/dev/random of=/dev/sda – Writes Junk Onto a Hard Drive</h3>
<p style="text-align:justify;">The <strong>dd if=/dev/random of=/dev/sda </strong>line will also obliterate the data on one of your hard drives.</p>
<blockquote><p><strong>dd</strong> – Perform low-level copying from one location to another.</p>
<p><strong>if=/dev/random</strong> – Use /dev/random (random data) as the input – you may also see locations such as /dev/zero (zeros).</p>
<p><strong>of=/dev/sda</strong> – Output to the first hard disk, replacing its file system with random garbage data.</p></blockquote>
<p style="text-align:justify;"><strong>The Lesson:</strong> dd copies data from one location to another, which can be dangerous if you’re copying directly to a device.</p>
<p style="text-align:justify;"><small><br />
</small></p>
<h3 style="text-align:justify;">mv ~ <a class="zem_slink" title="/dev/null" href="http://en.wikipedia.org/wiki//dev/null" target="_blank" rel="wikipedia">/dev/null</a> – Moves Your <a class="zem_slink" title="Home directory" href="http://en.wikipedia.org/wiki/Home_directory" target="_blank" rel="wikipedia">Home Directory</a> to a <a class="zem_slink" title="Black hole" href="http://en.wikipedia.org/wiki/Black_hole" target="_blank" rel="wikipedia">Black Hole</a></h3>
<p style="text-align:justify;">/dev/null is another special location – moving something to /dev/null is the same thing as destroying it. Think of /dev/null as a black hole. Essentially, <strong>mv ~ /dev/null</strong> sends all your personal files into a black hole.</p>
<blockquote><p><strong>mv</strong> – Move the following file or directory to another location.</p>
<p><strong>~</strong> – Represents your entire home folder.</p>
<p><strong>/dev/null</strong> – Move your home folder to /dev/null, destroying all your files and deleting the original copies.</p></blockquote>
<p style="text-align:justify;"><strong>The Lesson:</strong> The ~ character represents your home folder and moving things to /dev/null destroys them.</p>
<h3 style="text-align:justify;">wget <a href="http://example.com/something" rel="nofollow">http://example.com/something</a> -O – | sh – Downloads and Runs a Script</h3>
<p style="text-align:justify;">The above line downloads a script from the web and sends it to sh,which executes the contents of the script. This can be dangerous if you’re not sure what the script is or if you don’t trust its source – don’t run untrusted scripts.</p>
<blockquote><p><strong>wget</strong> – Downloads a file. (You may also see curl in place of wget.)</p>
<p><strong><a href="http://example.com/something" rel="nofollow">http://example.com/something</a></strong> – Download the file from this location.</p>
<p><strong>|</strong> – Pipe (send) the output of the wget command (the file you downloaded) directly to another command.</p>
<p><strong>sh</strong> – Send the file to the sh command, which executes it if it’s a bash script.</p></blockquote>
<p style="text-align:justify;"><strong>The Lesson:</strong> Don’t download and run untrusted scripts from the web, even with a command.</p>
<hr />
<p style="text-align:justify;">Know any other dangerous commands that new (and experienced) Linux users shouldn’t run? Leave a comment and share them!</p>
<p><!-- google_ad_section_end --></p>
<div style="clear:both;height:5px;"></div>
<div style="margin-top:10px;margin-bottom:10px;"><!-- Place this tag where you want the +1 button to render. --></div>
<div class="g-plusone"></div>
<p><!-- Place this tag after the last +1 button tag. --></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/671/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/671/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=671&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2013/04/21/8-deadly-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>
	</item>
		<item>
		<title>Is your system running slow ????????????</title>
		<link>https://redhatlinux4u.wordpress.com/2013/03/15/is-your-system-running-slow/</link>
		<comments>https://redhatlinux4u.wordpress.com/2013/03/15/is-your-system-running-slow/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 15:11:10 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[redhatlinux4u]]></category>
		<category><![CDATA[rhce]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[system administrator]]></category>
		<category><![CDATA[system libraries]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[top sorts]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=663</guid>
		<description><![CDATA[Sometimes you running an application but it&#8217;s takes more time that u have already done with your lunch or with your other work. You feeling sometimes bore. But have you feel the logic behind this , Why your system working slow ? or you can say , sometimes your system working slow , But why [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=663&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;"><em>Sometimes you running an application but it&#8217;s takes more time that u have already done with your lunch or with your other work. You feeling sometimes bore. But have you feel the logic behind this , Why your system working slow ? or you can say , sometimes your system working slow , But why it happens !!!!!</em></p>
<p style="text-align:justify;">I think it’s safe to say that most people familiar with both Linux and Windows would tell you that your average Linux install would outperform an equivalent Windows install on the same machine.Computer users expect their systems to work well at all times, but unfortunately this isn’t always the case. If your system becomes slow, there certainly is something you can do about it. So let&#8217;s see why it happens or how u can check it !!!</p>
<h2>CPU Load</h2>
<p style="text-align:justify;">We’ll start with the most obvious cause of PC slowness – processor overload. As you’re reading this website, it’s got various bits of JavaScript running. Each time you load the page, the JavaScript is read as text, interpreted by your browser, passed to your operating system which loads system libraries and passes the data to your kernel – which works through the hardware drivers to actually run the program through your CPU. We get the convenience of being able to have a single script run on nearly every computer, but all that interpretation and data passing can really hammer down your system performance.</p>
<p style="text-align:justify;">The most basic way to check your CPU load is with the command-line utility <em>top</em>. It contains a lot of information, but it really shines when trying to make comparisons between the CPU and RAM usage of various applications.</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-38882" title="linuxperformance-topcpu" alt="linuxperformance-topcpu" src="http://i2.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-topcpu.png?resize=570%2C292" /></p>
<p style="text-align:justify;">In that screenshot, you can see that <em>top</em> sorts the entries with the highest usage on top, so that you can see right away what’s using the most CPU or RAM, and the result is shown in percentages.</p>
<p style="text-align:justify;">It’s worth noting that on a machine with multiple cores, it’s quite possible that the percentages <em>top</em> shows you will total up to more than 100% (ie, one core is 70% of max and another is 60%, top might show 130% usage).</p>
<h2 style="text-align:justify;">RAM Usage</h2>
<p style="text-align:justify;">Next to CPU, your RAM (or lack thereof) is the mostly likely culprit of performance problems. Most MakeTechEasier readers are probably familiar with how RAM works, but here’s a quick primer for those who don’t.</p>
<p style="text-align:justify;">Let’s say you’re at a library, and the new <em>Larry Porter and the Prince of Bologna</em> book is out. Normally, fantasy books are kept in the basement, but these books are hugely popular, so the library staff keeps a stack of them right at the front desk. This means that the library patrons can grab their book quickly and easily without going to the basement, it’s a win-win for everyone. That all sounds great, but you can’t do that with EVERY book in the library. Since the staff cannot keep a single convenient shelf for every book they have, most of them get kept in sections such as the basement.</p>
<p style="text-align:justify;">That’s similar to how hard drives and RAM work. The hard drive, in this analogy, would be the basement shelves. It’s well suited to long-term, organized storage. The RAM is the smaller area by the front desk, and space specifically suited to hold the most needed items so that they can be retrieved quickly.</p>
<p style="text-align:justify;">If you’ve got too much in your RAM (too many programs and services running) then the computer’s ability to retrieve the needed information can be drastically reduced. Suddenly it’s got to sort through a giant stack of stuff instead of just grabbing what it needs.</p>
<p style="text-align:justify;">While it’s true that the <em>free</em> command will give you basic memory info, this is another case where <em>top</em> can come in very handy. Instead of simply showing “X mb free”, <em>top</em> will give you the detailed numbers, percentages, and swap usage information.</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-38883" title="linuxperformance-topmem" alt="linuxperformance-topmem" src="http://i1.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-topmem.png?resize=569%2C323" /></p>
<p style="text-align:justify;">Take note of the swap usage information. On an average desktop, the percentage of used swap space should generally be very low. If it’s not, you may have to just go out and buy more RAM (or seriously reduce the amount of running programs.)</p>
<h2 style="text-align:justify;">Overworked Hard Drive</h2>
<p style="text-align:justify;">Is your hard drive light constantly chugging along, yet you have no idea what it’s doing? Mysterious input/output can sure be a problem, so there is a top-like tool called <em>iotop</em> specifically meant to help diagnose this kind of problem.</p>
<p style="text-align:justify;">It is not, however, built in to many distributions so you’ll likely have to install it separately. It should be available in your distro’s repositories.</p>
<p style="text-align:justify;">A normal, idle system should be mostly zeros across the board, sometimes with a few small bursts while data is being written, as in the screenshot below.</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-38884" title="linuxperformance-iotop1" alt="linuxperformance-iotop1" src="http://i0.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-iotop1.png?resize=569%2C227" /></p>
<p style="text-align:justify;">If however, you run a disk-intensive utility like find, you’ll see its name and throughput listed clearly in <em>iotop</em>.</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-38885" title="linuxperformance-iotop2" alt="linuxperformance-iotop2" src="http://i0.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-iotop2.png?resize=569%2C238" /></p>
<p style="text-align:justify;">Now, you can easily find out what program is using your I/O (in this case I ran “find / -name chicken”), who ran it, the speed the data is being read, and more.</p>
<h2 style="text-align:justify;">GUI Tools</h2>
<p style="text-align:justify;">The author of this post chose command line tools to gather this information for two main reasons. First, CLI tools generally require fewer resources than GUI tools, and second, tools like top can be found in just about any Linux system, where as GUI tools can be hit-or-miss.</p>
<p style="text-align:justify;">Many people do not like the command line, and there are several GUI tools to perform system monitoring, but this author recommends Gnome System Monitor. It’s already available on just about any Gnome-based distribution, and includes a lot of useful information including realtime graphs for CPU, memory, and network.</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-38886" title="linuxperformance-gsysmon" alt="linuxperformance-gsysmon" src="http://i1.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-gsysmon.png?resize=591%2C523" /></p>
<h2 style="text-align:justify;">Conclusion</h2>
<p style="text-align:justify;">While there are many things that can potentially cause system slowness those three things (CPU, RAM, and disk I/O) are behind the vast majority of performance problems. Using the tools described here won’t solve your performance problem, but they’ll make the cause of the problem a whole lot easier to find.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/663/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/663/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=663&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2013/03/15/is-your-system-running-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>

		<media:content url="http://i2.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-topcpu.png?resize=570%2C292" medium="image">
			<media:title type="html">linuxperformance-topcpu</media:title>
		</media:content>

		<media:content url="http://i1.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-topmem.png?resize=569%2C323" medium="image">
			<media:title type="html">linuxperformance-topmem</media:title>
		</media:content>

		<media:content url="http://i0.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-iotop1.png?resize=569%2C227" medium="image">
			<media:title type="html">linuxperformance-iotop1</media:title>
		</media:content>

		<media:content url="http://i0.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-iotop2.png?resize=569%2C238" medium="image">
			<media:title type="html">linuxperformance-iotop2</media:title>
		</media:content>

		<media:content url="http://i1.wp.com/imagecdn5.maketecheasier.com/2011/09/linuxperformance-gsysmon.png?resize=591%2C523" medium="image">
			<media:title type="html">linuxperformance-gsysmon</media:title>
		</media:content>
	</item>
		<item>
		<title>Lazy Linux: Some essential tricks for admins</title>
		<link>https://redhatlinux4u.wordpress.com/2012/11/22/lazy-linux-some-essential-tricks-for-admins/</link>
		<comments>https://redhatlinux4u.wordpress.com/2012/11/22/lazy-linux-some-essential-tricks-for-admins/#comments</comments>
		<pubDate>Thu, 22 Nov 2012 11:23:27 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rhce]]></category>
		<category><![CDATA[rhcsa]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[system administrator]]></category>
		<category><![CDATA[tip and tricks]]></category>
		<category><![CDATA[tips & tricks]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=234</guid>
		<description><![CDATA[The best systems administrators are set apart by their efficiency. And if an efficient systems administrator can do a task in 10 minutes that would take another mortal two hours to complete, then the efficient systems administrator should be rewarded (paid more) because the company is saving time, and time is money, right?  The trick [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=234&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;"><em>The best systems administrators are set apart by their efficiency. And if an efficient systems administrator can do a task in 10 minutes that would take another mortal two hours to complete, then the efficient systems administrator should be rewarded (paid more) because the company is saving time, and time is money, right? </em></p>
<p><em> The trick is to prove your efficiency to management. While I won&#8217;t attempt to cover that trick in this article, I will give you 10 essential gems from the lazy admin&#8217;s bag of tricks. These tips will save you time—and even if you don&#8217;t get paid more money to be more efficient, you&#8217;ll at least have more time to play an Action Game.</em></p>
<p style="text-align:justify;">
<p style="text-align:justify;"><strong>Trick 1: Unmounting the unresponsive DVD drive</strong></p>
<p>The newbie states that when he pushes the Eject button on the DVD drive of a server running a certain Redmond-based operating system, it will eject immediately. He then complains that, in most enterprise Linux servers, if a process is running in that directory, then the ejection won&#8217;t happen. For too long as a Linux administrator, I would reboot the machine and get my disk on the bounce if I couldn&#8217;t figure out what was running and why it wouldn&#8217;t release the DVD drive. But this is ineffective.</p>
<p>Here&#8217;s how you find the process that holds your DVD drive and eject it to your heart&#8217;s content: First, simulate it. Stick a disk in your DVD drive, open up a terminal, and mount the DVD drive:</p>
<p># mount /media/cdrom<br />
# cd /media/cdrom<br />
# while [ 1 ]; do echo &#8220;All your drives are belong to us!&#8221;; sleep 30; done</p>
<p>Now open up a second terminal and try to eject the DVD drive:</p>
<p># eject</p>
<p>You&#8217;ll get a message like:</p>
<p>umount: /media/cdrom: device is busy</p>
<p>Before you free it, let&#8217;s find out who is using it.</p>
<p># fuser /media/cdrom</p>
<p>You see the process was running and, indeed, it is our fault we can not eject the disk.</p>
<p>Now, if you are root, you can exercise your godlike powers and kill processes:</p>
<p># fuser -k /media/cdrom</p>
<p>Boom! Just like that, freedom. Now solemnly unmount the drive:</p>
<p># eject</p>
<p>fuser is good.</p>
<p><strong>Trick 2: Getting your screen back when it&#8217;s hosed</strong></p>
<p>Try this:</p>
<p># cat /bin/cat</p>
<p>Behold! Your terminal looks like garbage. Everything you type looks like you&#8217;re looking into the Matrix. What do you do?</p>
<p>You type reset. But wait you say, typing reset is too close to typing reboot or shutdown. Your palms start to sweat—especially if you are doing this on a production machine.</p>
<p>Rest assured: You can do it with the confidence that no machine will be rebooted. Go ahead, do it:</p>
<p># reset</p>
<p>Now your screen is back to normal. This is much better than closing the window and then logging in again, especially if you just went through five machines to SSH to this machine.</p>
<p><strong>Trick 3: Collaboration with screen</strong></p>
<p>David, the high-maintenance user from product engineering, calls: &#8220;I need you to help me understand why I can&#8217;t compile supercode.c on these new machines you deployed.&#8221;</p>
<p>&#8220;Fine,&#8221; you say. &#8220;What machine are you on?&#8221;</p>
<p>David responds: &#8221; Posh.&#8221; (Yes, this fictional company has named its five production servers in honor of the Spice Girls.) OK, you say. You exercise your godlike root powers and on another machine become David:</p>
<p># su &#8211; david</p>
<p>Then you go over to posh:</p>
<p># ssh posh</p>
<p>Once you are there, you run:</p>
<p># screen -S foo</p>
<p>Then you holler at David:</p>
<p>&#8220;Hey David, run the following command on your terminal: # screen -x foo.&#8221;</p>
<p>This will cause your and David&#8217;s sessions to be joined together in the holy Linux shell. You can type or he can type, but you&#8217;ll both see what the other is doing. This saves you from walking to the other floor and lets you both have equal control. The benefit is that David can watch your troubleshooting skills and see exactly how you solve problems.</p>
<p>At last you both see what the problem is: David&#8217;s compile script hard-coded an old directory that does not exist on this new server. You mount it, recompile, solve the problem, and David goes back to work. You then go back to whatever lazy activity you were doing before.</p>
<p>The one caveat to this trick is that you both need to be logged in as the same user. Other cool things you can do with the screen command include having multiple windows and split screens. Read the man pages for more on that.</p>
<p>But I&#8217;ll give you one last tip while you&#8217;re in your screen session. To detach from it and leave it open, type: Ctrl-A D . (I mean, hold down the Ctrl key and strike the A key. Then push the D key.)</p>
<p>You can then reattach by running the screen -x foo command again.</p>
<p><strong>Trick 4: Getting back the root password</strong></p>
<p>You forgot your root password. Nice work. Now you&#8217;ll just have to reinstall the entire machine. Sadly enough, I&#8217;ve seen more than a few people do this. But it&#8217;s surprisingly easy to get on the machine and change the password. This doesn&#8217;t work in all cases (like if you made a GRUB password and forgot that too), but here&#8217;s how you do it in a normal case with a Cent OS Linux example.</p>
<p>First reboot the system. When it reboots you&#8217;ll come to the GRUB screen as shown in Figure 1. Move the arrow key so that you stay on this screen instead of proceeding all the way to a normal boot.</p>
<p>Figure 1. GRUB screen after reboot</p>
<p>Next, select the kernel that will boot with the arrow keys, and type E to edit the kernel line. You&#8217;ll then see something like Figure 2:</p>
<p>Figure 2. Ready to edit the kernel line</p>
<p>Use the arrow key again to highlight the line that begins with kernel, and press E to edit the kernel parameters. When you get to the screen shown in Figure 3, simply append the number 1 to the arguments as shown in Figure 3:</p>
<p>Figure 3. Append the argument with the number 1</p>
<p>Then press Enter, B, and the kernel will boot up to single-user mode. Once here you can run the passwd command, changing password for user root:</p>
<p>sh-3.00# passwd<br />
New UNIX password:<br />
Retype new UNIX password:<br />
passwd: all authentication tokens updated successfully</p>
<p>Now you can reboot, and the machine will boot up with your new password.</p>
<p><strong>Trick 5: SSH back door</strong></p>
<p>Many times I&#8217;ll be at a site where I need remote support from someone who is blocked on the outside by a company firewall. Few people realize that if you can get out to the world through a firewall, then it is relatively easy to open a hole so that the world can come into you.</p>
<p>In its crudest form, this is called &#8220;poking a hole in the firewall.&#8221; I&#8217;ll call it an SSH back door. To use it, you&#8217;ll need a machine on the Internet that you can use as an intermediary.</p>
<p>In our example, we&#8217;ll call our machine blackbox.example.com. The machine behind the company firewall is called ginger. Finally, the machine that technical support is on will be called tech. Figure 4 explains how this is set up.</p>
<p>Figure 4. Poking a hole in the firewall</p>
<p>Here&#8217;s how to proceed:<br />
Check that what you&#8217;re doing is allowed, but make sure you ask the right people. Most people will cringe that you&#8217;re opening the firewall, but what they don&#8217;t understand is that it is completely encrypted. Furthermore, someone would need to hack your outside machine before getting into your company. Instead, you may belong to the school of &#8220;ask-for-forgiveness-instead-of-permission.&#8221; Either way, use your judgment and don&#8217;t blame me if this doesn&#8217;t go your way.</p>
<p>SSH from ginger to blackbox.example.com with the -R flag. I&#8217;ll assume that you&#8217;re the root user on ginger and that tech will need the root user ID to help you with the system. With the -R flag, you&#8217;ll forward instructions of port 2222 on blackbox to port 22 on ginger. This is how you set up an SSH tunnel. Note that only SSH traffic can come into ginger: You&#8217;re not putting ginger out on the Internet naked.</p>
<p>You can do this with the following syntax:</p>
<p>~# ssh -R 2222:localhost:22 thedude@blackbox.example.com</p>
<p>Once you are into blackbox, you just need to stay logged in. I usually enter a command like:</p>
<p>thedude@blackbox:~$ while [ 1 ]; do date; sleep 300; done</p>
<p>to keep the machine busy. And minimize the window.<br />
Now instruct your friends at tech to SSH as thedude into blackbox without using any special SSH flags. You&#8217;ll have to give them your password:</p>
<p>root@tech:~# ssh thedude@blackbox.example.com .<br />
Once tech is on the blackbox, they can SSH to ginger using the following command:</p>
<p>thedude@blackbox:~$: ssh -p 2222 root@localhost<br />
Tech will then be prompted for a password. They should enter the root password of ginger.</p>
<p>Now you and support from tech can work together and solve the problem. You may even want to use screen together! (See Trick 4.)</p>
<p>Back to top</p>
<p>Trick 6: Remote VNC session through an SSH tunnel</p>
<p>VNC or virtual network computing has been around a long time. I typically find myself needing to use it when the remote server has some type of graphical program that is only available on that server.</p>
<p>For example, suppose in Trick 5, ginger is a storage server. Many storage devices come with a GUI program to manage the storage controllers. Often these GUI management tools need a direct connection to the storage through a network that is at times kept in a private subnet. Therefore, the only way to access this GUI is to do it from ginger.</p>
<p>You can try SSH&#8217;ing to ginger with the -X option and launch it that way, but many times the bandwidth required is too much and you&#8217;ll get frustrated waiting. VNC is a much more network-friendly tool and is readily available for nearly all operating systems.</p>
<p>Let&#8217;s assume that the setup is the same as in Trick 5, but you want tech to be able to get VNC access instead of SSH. In this case, you&#8217;ll do something similar but forward VNC ports instead. Here&#8217;s what you do:<br />
Start a VNC server session on ginger. This is done by running something like:</p>
<p>root@ginger:~# vncserver -geometry 1024&#215;768 -depth 24 :99</p>
<p>The options tell the VNC server to start up with a resolution of 1024&#215;768 and a pixel depth of 24 bits per pixel. If you are using a really slow connection setting, 8 may be a better option. Using :99 specifies the port the VNC server will be accessible from. The VNC protocol starts at 5900 so specifying :99 means the server is accessible from port 5999.</p>
<p>When you start the session, you&#8217;ll be asked to specify a password. The user ID will be the same user that you launched the VNC server from. (In our case, this is root.)<br />
SSH from ginger to blackbox.example.com forwarding the port 5999 on blackbox to ginger. This is done from ginger by running the command:</p>
<p>root@ginger:~# ssh -R 5999:localhost:5999 thedude@blackbox.example.com</p>
<p>Once you run this command, you&#8217;ll need to keep this SSH session open in order to keep the port forwarded to ginger. At this point if you were on blackbox, you could now access the VNC session on ginger by just running:</p>
<p>thedude@blackbox:~$ vncviewer localhost:99</p>
<p>That would forward the port through SSH to ginger. But we&#8217;re interested in letting tech get VNC access to ginger. To accomplish this, you&#8217;ll need another tunnel.<br />
From tech, you open a tunnel via SSH to forward your port 5999 to port 5999 on blackbox. This would be done by running:</p>
<p>root@tech:~# ssh -L 5999:localhost:5999 thedude@blackbox.example.com</p>
<p>This time the SSH flag we used was -L, which instead of pushing 5999 to blackbox, pulled from it. Once you are in on blackbox, you&#8217;ll need to leave this session open. Now you&#8217;re ready to VNC from tech!<br />
From tech, VNC to ginger by running the command:</p>
<p>root@tech:~# vncviewer localhost:99 .</p>
<p>Tech will now have a VNC session directly to ginger.</p>
<p>While the effort might seem like a bit much to set up, it beats flying across the country to fix the storage arrays. Also, if you practice this a few times, it becomes quite easy.</p>
<p>Let me add a trick to this trick: If tech was running the Windows® operating system and didn&#8217;t have a command-line SSH client, then tech can run Putty. Putty can be set to forward SSH ports by looking in the options in the sidebar. If the port were 5902 instead of our example of 5999, then you would enter something like in Figure 5.</p>
<p>Figure 5. Putty can forward SSH ports for tunneling</p>
<p>If this were set up, then tech could VNC to localhost:2 just as if tech were running the Linux operating system.</p>
<p>Back to top</p>
<p>Trick 7: Checking your bandwidth</p>
<p>Imagine this: Company A has a storage server named ginger and it is being NFS-mounted by a client node named beckham. Company A has decided they really want to get more bandwidth out of ginger because they have lots of nodes they want to have NFS mount ginger&#8217;s shared filesystem.</p>
<p>The most common and cheapest way to do this is to bond two Gigabit ethernet NICs together. This is cheapest because usually you have an extra on-board NIC and an extra port on your switch somewhere.</p>
<p>So they do this. But now the question is: How much bandwidth do they really have?</p>
<p>Gigabit Ethernet has a theoretical limit of 128MBps. Where does that number come from? Well,</p>
<p>1Gb = 1024Mb; 1024Mb/8 = 128MB; &#8220;b&#8221; = &#8220;bits,&#8221; &#8220;B&#8221; = &#8220;bytes&#8221;</p>
<p>But what is it that we actually see, and what is a good way to measure it? One tool I suggest is iperf. You can grab iperf like this:</p>
<p># wget <a href="http://dast.nlanr.net/Projects/Iperf2.0/iperf-2.0.2.tar.gz" rel="nofollow">http://dast.nlanr.net/Projects/Iperf2.0/iperf-2.0.2.tar.gz</a></p>
<p>You&#8217;ll need to install it on a shared filesystem that both ginger and beckham can see. or compile and install on both nodes. I&#8217;ll compile it in the home directory of the bob user that is viewable on both nodes:</p>
<p>tar zxvf iperf*gz<br />
cd iperf-2.0.2<br />
./configure -prefix=/home/bob/perf<br />
make<br />
make install</p>
<p>On ginger, run:</p>
<p># /home/bob/perf/bin/iperf -s -f M</p>
<p>This machine will act as the server and print out performance speeds in MBps.</p>
<p>On the beckham node, run:</p>
<p># /home/bob/perf/bin/iperf -c ginger -P 4 -f M -w 256k -t 60</p>
<p>You&#8217;ll see output in both screens telling you what the speed is. On a normal server with a Gigabit Ethernet adapter, you will probably see about 112MBps. This is normal as bandwidth is lost in the TCP stack and physical cables. By connecting two servers back-to-back, each with two bonded Ethernet cards, I got about 220MBps.</p>
<p>In reality, what you see with NFS on bonded networks is around 150-160MBps. Still, this gives you a good indication that your bandwidth is going to be about what you&#8217;d expect. If you see something much less, then you should check for a problem.</p>
<p>I recently ran into a case in which the bonding driver was used to bond two NICs that used different drivers. The performance was extremely poor, leading to about 20MBps in bandwidth, less than they would have gotten had they not bonded the Ethernet cards together!</p>
<p>Back to top</p>
<p>Trick 8: Command-line scripting and utilities</p>
<p>A Linux systems administrator becomes more efficient by using command-line scripting with authority. This includes crafting loops and knowing how to parse data using utilities like awk, grep, and sed. There are many cases where doing so takes fewer keystrokes and lessens the likelihood of user errors.</p>
<p>For example, suppose you need to generate a new /etc/hosts file for a Linux cluster that you are about to install. The long way would be to add IP addresses in vi or your favorite text editor. However, it can be done by taking the already existing /etc/hosts file and appending the following to it by running this on the command line:</p>
<p># P=1; for i in $(seq -w 200); do echo &#8220;192.168.99.$P n$i&#8221;; P=$(expr $P + 1);<br />
done &gt;&gt;/etc/hosts</p>
<p>Two hundred host names, n001 through n200, will then be created with IP addresses 192.168.99.1 through 192.168.99.200. Populating a file like this by hand runs the risk of inadvertently creating duplicate IP addresses or host names, so this is a good example of using the built-in command line to eliminate user errors. Please note that this is done in the bash shell, the default in most Linux distributions.</p>
<p>As another example, let&#8217;s suppose you want to check that the memory size is the same in each of the compute nodes in the Linux cluster. In most cases of this sort, having a distributed or parallel shell would be the best practice, but for the sake of illustration, here&#8217;s a way to do this using SSH.</p>
<p>Assume the SSH is set up to authenticate without a password. Then run:</p>
<p># for num in $(seq -w 200); do ssh n$num free -tm | grep Mem | awk &#8216;{print $2}&#8217;;<br />
done | sort | uniq</p>
<p>A command line like this looks pretty terse. (It can be worse if you put regular expressions in it.) Let&#8217;s pick it apart and uncover the mystery.</p>
<p>First you&#8217;re doing a loop through 001-200. This padding with 0s in the front is done with the -w option to the seq command. Then you substitute the num variable to create the host you&#8217;re going to SSH to. Once you have the target host, give the command to it. In this case, it&#8217;s:</p>
<p>free -m | grep Mem | awk &#8216;{print $2}&#8217;</p>
<p>That command says to:<br />
Use the free command to get the memory size in megabytes.<br />
Take the output of that command and use grep to get the line that has the string Mem in it.<br />
Take that line and use awk to print the second field, which is the total memory in the node.</p>
<p>This operation is performed on every node.</p>
<p>Once you have performed the command on every node, the entire output of all 200 nodes is piped (|d) to the sort command so that all the memory values are sorted.</p>
<p>Finally, you eliminate duplicates with the uniq command. This command will result in one of the following cases:<br />
If all the nodes, n001-n200, have the same memory size, then only one number will be displayed. This is the size of memory as seen by each operating system.<br />
If node memory size is different, you will see several memory size values.<br />
Finally, if the SSH failed on a certain node, then you may see some error messages.</p>
<p>This command isn&#8217;t perfect. If you find that a value of memory is different than what you expect, you won&#8217;t know on which node it was or how many nodes there were. Another command may need to be issued for that.</p>
<p>What this trick does give you, though, is a fast way to check for something and quickly learn if something is wrong. This is it&#8217;s real value: Speed to do a quick-and-dirty check.</p>
<p>Back to top</p>
<p>Trick 9: Spying on the console</p>
<p>Some software prints error messages to the console that may not necessarily show up on your SSH session. Using the vcs devices can let you examine these. From within an SSH session, run the following command on a remote server: # cat /dev/vcs1. This will show you what is on the first console. You can also look at the other virtual terminals using 2, 3, etc. If a user is typing on the remote system, you&#8217;ll be able to see what he typed.</p>
<p>In most data farms, using a remote terminal server, KVM, or even Serial Over LAN is the best way to view this information; it also provides the additional benefit of out-of-band viewing capabilities. Using the vcs device provides a fast in-band method that may be able to save you some time from going to the machine room and looking at the console.</p>
<p>Back to top</p>
<p>Trick 10: Random system information collection</p>
<p>In Trick 8, you saw an example of using the command line to get information about the total memory in the system. In this trick, I&#8217;ll offer up a few other methods to collect important information from the system you may need to verify, troubleshoot, or give to remote support.</p>
<p>First, let&#8217;s gather information about the processor. This is easily done as follows:</p>
<p># cat /proc/cpuinfo .</p>
<p>This command gives you information on the processor speed, quantity, and model. Using grep in many cases can give you the desired value.</p>
<p>A check that I do quite often is to ascertain the quantity of processors on the system. So, if I have purchased a dual processor quad-core server, I can run:</p>
<p># cat /proc/cpuinfo | grep processor | wc -l .</p>
<p>I would then expect to see 8 as the value. If I don&#8217;t, I call up the vendor and tell them to send me another processor.</p>
<p>Another piece of information I may require is disk information. This can be gotten with the df command. I usually add the -h flag so that I can see the output in gigabytes or megabytes. # df -h also shows how the disk was partitioned.</p>
<p>And to end the list, here&#8217;s a way to look at the firmware of your system—a method to get the BIOS level and the firmware on the NIC.</p>
<p>To check the BIOS version, you can run the dmidecode command. Unfortunately, you can&#8217;t easily grep for the information, so piping it is a less efficient way to do this. On my Lenovo T61 laptop, the output looks like this:</p>
<p>#dmidecode | less<br />
&#8230;<br />
BIOS Information<br />
Vendor: LENOVO<br />
Version: 7LET52WW (1.22 )<br />
Release Date: 08/27/2007<br />
&#8230;</p>
<p>This is much more efficient than rebooting your machine and looking at the POST output.</p>
<p>To examine the driver and firmware versions of your Ethernet adapter, run ethtool:</p>
<p># ethtool -i eth0<br />
driver: e1000<br />
version: 7.3.20-k2-NAPI<br />
firmware-version: 0.3-0</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/234/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=234&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2012/11/22/lazy-linux-some-essential-tricks-for-admins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>
	</item>
		<item>
		<title>Understanding Linux configuration files</title>
		<link>https://redhatlinux4u.wordpress.com/2012/10/08/understanding-linux-configuration-files/</link>
		<comments>https://redhatlinux4u.wordpress.com/2012/10/08/understanding-linux-configuration-files/#comments</comments>
		<pubDate>Mon, 08 Oct 2012 06:08:18 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Linux Introduction]]></category>
		<category><![CDATA[Rhel 6 Covers & Notes]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Softwares]]></category>
		<category><![CDATA[/etc]]></category>
		<category><![CDATA[configuration files]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rhel6]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=228</guid>
		<description><![CDATA[Summary: This article explains configuration files on a Linux system that control user permissions, system applications, daemons, services, and other administrative tasks in a multi-user, multi-tasking environment. These tasks include managing user accounts, allocating disk quotas, managing e-mails and newsgroups, and configuring kernel parameters. This article also classifies the config files present on a Red [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=228&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;"><strong>Summary</strong>: <em>This article explains <a class="zem_slink" title="Configuration file" href="http://en.wikipedia.org/wiki/Configuration_file" rel="wikipedia" target="_blank">configuration files</a> on a <a class="zem_slink" title="Linux" href="http://en.wikipedia.org/wiki/Linux" rel="wikipedia" target="_blank">Linux</a> system that control user permissions, system applications, daemons, services, and other administrative tasks in a multi-user, multi-tasking environment. These tasks include managing user accounts, allocating disk quotas, managing e-mails and newsgroups, and configuring kernel parameters. This article also classifies the config files present on a <a class="zem_slink" title="Red Hat Linux" href="http://www.redhat.com" rel="homepage" target="_blank">Red Hat Linux</a> system based on their usage and the services they affect.</em></p>
<p style="text-align:justify;"><!-- MAIN_COLUMN_CONTENT_BEGIN --></p>
<p style="text-align:justify;"><a name="g11"></a><br />
<strong><span class="atitle">Introduction</span></strong></p>
<p style="text-align:justify;"><em>Every Linux program is an <a class="zem_slink" title="Executable" href="http://en.wikipedia.org/wiki/Executable" rel="wikipedia" target="_blank">executable file</a> holding the list of opcodes the CPU executes to accomplish specific operations. For instance, the ls command is provided by the file /bin/ls, which holds the list of machine instructions needed to display the list of files in the current directory onto the screen.</em><br />
<em> The behaviour of almost every program can be customized to your preferences or needs by modifying its configuration files.</em></p>
<p style="text-align:justify;"><a name="h3283"></a><br />
<span class="smalltitle"><br />
<strong>Is there a standard configuration file format in Linux?</strong></span></p>
<p style="text-align:justify;"><em>In a word, no. Users who are new to Linux (rightly) feel frustrated that each configuration file looks like a new challenge to figure out. In Linux each programmer is free to choose the configuration file format he or she prefers. Format options range from the /etc/shells file, which contains a list of possible shells separated by a newline, to Apache&#8217;s complex /etc/httpd.conf file.</em></p>
<p style="text-align:justify;"><a name="h4108"></a><span class="smalltitle"><br />
<strong>What are system configuration files?</strong></span></p>
<p style="text-align:justify;"><em>The kernel itself may be considered a &#8220;program.&#8221; Why does the kernel need configuration files? The kernel needs to know the list of users and groups in the system, and manage <a class="zem_slink" title="Filesystem permissions" href="http://en.wikipedia.org/wiki/Filesystem_permissions" rel="wikipedia" target="_blank">file permissions</a> (that is, determine if a file can be opened by a specific user, according to the permissions, UNIX_USERS). Note that these files are not specifically read by programs, but by a function provided by a system library, and used by the kernel. For instance, a program needing the (encrypted) password of a user should not open the /etc/passwd file. Instead, it should call the system library function getpw(). This kind of function is also known as a system call. It is up to the kernel (through the system library) to open the /etc/passwd file and after that, search for the password of the requested user.</em></p>
<p style="text-align:justify;"><em>Most of the configuration files in the Red Hat Linux system are in the /etc directory unless otherwise specified. The configuration files can be broadly classified into the following categories:</em></p>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="g1"></a><strong><span class="atitle">Access files</span></strong></p>
<table class="ibm-data-table" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<td><strong><em>/etc/host.conf</em></strong></td>
<td>Tells the network domain server how to look up hostnames. (Normally /etc/hosts,<br />
then name server; it can be changed through netconf.)</td>
</tr>
<tr>
<td><strong><em>/etc/hosts</em></strong></td>
<td>Contains a list of known hosts (in the local network). Can be<br />
used if the IP of the system is not dynamically generated. For simple hostname<br />
resolution (to dotted notation), /etc/hosts.conf normally tells the resolver to look here<br />
before asking the network nameserver, <a class="zem_slink" title="Domain Name System" href="http://en.wikipedia.org/wiki/Domain_Name_System" rel="wikipedia" target="_blank">DNS</a> or NIS.</td>
</tr>
<tr>
<td><strong><em>/etc/hosts.allow</em></strong></td>
<td><a class="zem_slink" title="Man page" href="http://en.wikipedia.org/wiki/Man_page" rel="wikipedia" target="_blank">Man page</a> same as hosts_access. Read by tcpd at least.</td>
</tr>
<tr>
<td><strong><em>/etc/hosts.deny</em></strong></td>
<td>Man page same as hosts_access. Read by tcpd at least.</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="g2"></a><span class="atitle">Booting and login/logout</span></p>
<table class="ibm-data-table" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<td><strong><em>/etc/issue &amp; /etc/issue.net</em></strong></td>
<td>These files are read by mingetty (and similar programs) to display<br />
a &#8220;welcome&#8221; string to the user connecting from a terminal (issue) or through a telnet session (issue.net).<br />
They include a few lines stating the <a class="zem_slink" title="Red Hat" href="http://www.redhat.com" rel="homepage" target="_blank">Red Hat</a> release number, name, and <a class="zem_slink" title="Kernel (computing)" href="http://en.wikipedia.org/wiki/Kernel_%28computing%29" rel="wikipedia" target="_blank">Kernel</a> ID. They are used by rc.local.</td>
</tr>
<tr>
<td><strong><em>/etc/redhat-release</em></strong></td>
<td>Includes one line stating the Red Hat release number and name. Used by rc.local.</td>
</tr>
<tr>
<td><strong><em>/etc/rc.d/rc</em></strong></td>
<td>Normally run for all <a class="zem_slink" title="Runlevel" href="http://en.wikipedia.org/wiki/Runlevel" rel="wikipedia" target="_blank">run levels</a> with level passed as argument.<br />
For example, to boot your machine in the Graphics mode (X-Server),<br />
run the following command from your command line: <code>init 5</code>. The runlevel<br />
5 is starts the system in graphics mode.</td>
</tr>
<tr>
<td><strong><em>/etc/rc.d/rc.local</em></strong></td>
<td>Not official. May be called from rc, rc.sysinit, or<br />
/etc/inittab.</td>
</tr>
<tr>
<td><strong><em>/etc/rc.d/rc.sysinit</em></strong></td>
<td>Normally the first script run for all run levels.</td>
</tr>
<tr>
<td><strong><em>/etc/rc.d/rc/rc<strong>X</strong>.d</em></strong></td>
<td>Scripts run from rc (<strong>X</strong><br />
stands for any number from 1 to 5). These directories are &#8220;run-level&#8221; specific directories.<br />
When a system starts up, it identifies the run-level to be initiated, and then it calls<br />
all the startup scripts present in the specific directory for that run-level. For example, the system usually starts up and the message<br />
&#8220;entering run-level 3&#8243; is shown after the boot messages; this means that all the init scripts<br />
in the directory /etc/rc.d/rc3.d/ will be called.</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="g3"></a><strong><span class="atitle">File system</span></strong></p>
<p style="text-align:justify;">The kernel provides an interface to display some of its data structures that can be useful for determining the system parameters like interrupts used, devices initialised, memory statistics, etc. This interface is provided as a separate but dummy filesystem known as the /proc filesystem. Many system utilities use the values present in this filesystemf or displaying the system statistics. For example, the file /proc/modules lists the currently loaded modules in the system. This information is read by the command lsmod, which then displays it in a human readable format.<br />
In the same way, the file mtab specified in the following table reads the /proc/mount file, which contains the currently mounted filesystems.</p>
<table class="ibm-data-table" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<td><strong><em>/etc/mtab</em></strong></td>
<td>This changes continuously as the file /proc/mount changes. In other words, when filesystems are mounted<br />
and unmounted, the change is immediately reflected in this file.</td>
</tr>
<tr>
<td><strong><em>/etc/fstab</em></strong></td>
<td>Lists the filesystems currently &#8220;mountable&#8221; by the computer.<br />
This is important because when the computer boots, it runs the command<br />
<code>mount -a</code>, which takes care of mounting every file system marked with a &#8220;1&#8243;<br />
in the next-to-last column of fstab.</td>
</tr>
<tr>
<td><strong><em>/etc/mtools.conf</em></strong></td>
<td>Configuration for all the operations (mkdir, copy, format, etc.) on a DOS-type filesystem.</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="g4"></a><strong><span class="atitle">System administration</span></strong></p>
<table class="ibm-data-table" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<td><strong><em>/etc/group</em></strong></td>
<td>Contains the valid group names and the users included in the specified<br />
groups. A single user can be present in more than one group if he<br />
performs multiple tasks. For example, is a &#8220;user&#8221; is the administrator as well as a member of the project<br />
group &#8220;project 1&#8243;, then his entry in the group file will look like:<br />
<code>user: * : group-id : project1</code></td>
</tr>
<tr>
<td><strong><em>/etc/nologin</em></strong></td>
<td>If the file /etc/nologin exists, login(1) will allow<br />
access only to root. Other users will be shown<br />
the contents of this file and their logins refused.</td>
</tr>
<tr>
<td><strong><em>etc/passwd</em></strong></td>
<td>See &#8220;man passwd&#8221;. Holds some user account info including passwords (when not &#8220;shadowed&#8221;).</td>
</tr>
<tr>
<td><strong><em>/etc/rpmrc</em></strong></td>
<td>rpm command configuration. All the rpm command line<br />
options can be set together in this file so that<br />
all of the options apply globally when any rpm command is run<br />
on that system.</td>
</tr>
<tr>
<td><strong><em>/etc/securetty</em></strong></td>
<td>Contains the device names of tty lines (one per line,<br />
without leading /dev/) on which root is allowed to login.</td>
</tr>
<tr>
<td><strong><em>/etc/usertty</em></strong><br />
<strong><em>/etc/shadow</em></strong></td>
<td>Contains the encrypted password information for users&#8217; accounts<br />
and optionally the password aging information. Included fields are:</p>
<ul>
<li>Login name</li>
<li>Encrypted password</li>
<li>Days since Jan 1, 1970 that password was last changed</li>
<li>Days before password may be changed</li>
<li>Days after which password must be changed</li>
<li>Days before password is to expire that user is warned</li>
<li>Days after password expires that account is disabled</li>
<li>Days since Jan 1, 1970 that account is disabled</li>
</ul>
</td>
</tr>
<tr>
<td><strong><em>/etc/shells</em></strong></td>
<td>Holds the list of possible &#8220;shells&#8221; available to the<br />
system.</td>
</tr>
<tr>
<td><strong><em>/etc/motd</em></strong></td>
<td>Message Of The Day; used if an administrator wants to convey some<br />
message to all the users of a Linux server.</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="g5"></a><strong><span class="atitle">Networking</span></strong></p>
<table class="ibm-data-table" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<td><strong><em>/etc/gated.conf</em></strong></td>
<td>Configuration for gated. Used only by the gated daemon.</td>
</tr>
<tr>
<td><strong><em>/etc/gated.version</em></strong></td>
<td>Contains the version number of the gated daemon.</td>
</tr>
<tr>
<td><strong><em>/etc/gateway</em></strong></td>
<td>Optionally used by the routed daemon.</td>
</tr>
<tr>
<td><strong><em>/etc/networks</em></strong></td>
<td>Lists names and addresses of networks accessible from the network<br />
to which the machine is connected. Used by route command. Allows use of name for network.</td>
</tr>
<tr>
<td><strong><em>/etc/protocols</em></strong></td>
<td>Lists the currently available protocols. See the NAG (Network Administrators Guide) and man page.C interface is getprotoent. Should never change.</td>
</tr>
<tr>
<td><strong><em>/etc/resolv.conf</em></strong></td>
<td>Tells the kernel which name server should be queried when<br />
a program asks to &#8220;resolve&#8221; an IP Address.</td>
</tr>
<tr>
<td><strong><em>/etc/rpc</em></strong></td>
<td>Contains instructions/rules for RPC, which<br />
can be used in NFS calls, remote file system mounting, etc.</td>
</tr>
<tr>
<td><strong><em>/etc/exports</em></strong></td>
<td>The file system to be exported (NFS) and<br />
permissions for it.</td>
</tr>
<tr>
<td><strong><em>/etc/services</em></strong></td>
<td>Translates network service names to port number/protocol. Read<br />
by inetd, telnet, tcpdump, and some other programs. There are C access routines.</td>
</tr>
<tr>
<td><strong><em>/etc/inetd.conf</em></strong></td>
<td>Config file for inetd. See the inetd man page.<br />
Holds an entry for each network service for which inetd must<br />
control daemons or other servicers. Note that services will be running, but comment them out in /etc/services so they will not be available even if running.<br />
Format: &lt;service_name&gt; &lt;sock_type&gt; &lt;proto&gt; &lt;flags&gt; &lt;user&gt; &lt;server_path&gt; &lt;args&gt;</td>
</tr>
<tr>
<td><strong><em>/etc/sendmail.cf</em></strong></td>
<td>The Mail program sendmail&#8217;s configuration file. Cryptic to understand.</td>
</tr>
<tr>
<td><strong><em>/etc/sysconfig/network</em></strong></td>
<td>Indicates NETWORKING=yes or no. Read by rc.sysinit at least.</td>
</tr>
<tr>
<td><strong><em>/etc/sysconfig/network-scripts/if*</em></strong></td>
<td>Red Hat network configuration scripts.</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="h16371"></a><strong><span class="atitle">System commands</span></strong></p>
<p style="text-align:justify;">System commands are meant exclusively to control the system, and make everything work properly. All the programs like login (performing the authentication phase of a user on the console) or bash (providing the interaction between a user and the computer) are system commands. The files associated with them are therefore particularly important. This category has the following files of interest to users and administrators.</p>
<table class="ibm-data-table" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<td><strong><em>/etc/lilo.conf</em></strong></td>
<td>Contains the system&#8217;s default boot command line parameters and also the<br />
different images to boot with. You can see this list by pressing Tab at<br />
the LILO prompt.</td>
</tr>
<tr>
<td><strong><em>/etc/logrotate.conf</em></strong></td>
<td>Maintains the log files present in the /var/log directory.</td>
</tr>
<tr>
<td><strong><em>/etc/identd.conf</em></strong></td>
<td>Identd is a server that implements the TCP/IP proposed standard IDENT<br />
user identification protocol as specified in the RFC 1413 document. identd<br />
operates by looking up specific TCP/IP connections and returning the user<br />
name of the process owning the connection. It can optionally return other<br />
information instead of a user name. See the identd man page.</td>
</tr>
<tr>
<td><strong><em>/etc/ld.so.conf</em></strong></td>
<td>Configuration for the Dynamic Linker.</td>
</tr>
<tr>
<td><strong><em>/etc/inittab</em></strong></td>
<td>This is chronologically the first configuration<br />
file in UNIX. The first program launched after a UNIX machine is<br />
switched on is init, which knows what to launch, thanks to inittab.<br />
It is read by init at run level changes, and controls the startup of the main process.</td>
</tr>
<tr>
<td><strong><em>/etc/termcap</em></strong></td>
<td>A database containing all of the possible terminal types<br />
and their capabilities.</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon">Back to top</a></p>
<p style="text-align:justify;"><a name="h18670"></a><span class="atitle">Daemons</span></p>
<p style="text-align:justify;">A daemon is a program running in non-interactive mode. Typically, daemon tasks are related to the networking area: they wait for connections, so that they can provide services through them. Many daemons are available for Linux, ranging from Web servers to ftp servers.</p>
<table class="ibm-data-table" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<td><strong><em>/etc/syslogd.conf</em></strong></td>
<td>The configuration file for the syslogd daemon. syslogd is the<br />
daemon that takes care of logging (writing to disk) messages<br />
coming from other programs to the system. This service, in particular,<br />
is used by daemons that would not otherwise have any means of signaling the presence of possible<br />
problems or sending messages to users.</td>
</tr>
<tr>
<td><strong><em>/etc/httpd.conf</em></strong></td>
<td>The configuration file for Apache, the Web server. This file is typically not in /etc.<br />
It may be in /usr/local/httpd/conf/ or /etc/httpd/conf/, but to make sure, you need to check the particular<br />
Apache installation.</td>
</tr>
<tr>
<td><strong><em>/etc/conf.modules or /etc/modules.conf</em></strong></td>
<td>The configuration file for kerneld. Ironically, it is not<br />
the kernel &#8220;as a daemon&#8221;. It is rather a daemon that takes care of loading additional kernel modules<br />
&#8220;on the fly&#8221; when needed.</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="h20612"></a><strong><span class="atitle">User programs</span></strong></p>
<p style="text-align:justify;"><strong>In Linux (and UNIX in general), there are countless &#8220;user&#8221; programs. A most common user program config file is /etc/lynx.cfg. This is the configuration file for lynx, the well-known textual browser. Through this file you can define the proxy server, the character set to use, and so on.</strong><br />
<strong> The following code sample shows a part of the lynx.cfg file that can be modified to change the proxy settings of the Linux system. These settings apply (by default) to all the users running lynx in their respective shells, unless a user overrides the default config file by specifying <code>--cfg = "mylynx.cfg</code>.</strong></p>
<p style="text-align:justify;"><a name="N1021C"></a><strong>Proxy settings in /etc/lynx.cfg </strong></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="code-outline">
<pre class="displaycode">.h1 proxy
.h2 HTTP_PROXY
.h2 HTTPS_PROXY
.h2 FTP_PROXY
.h2 GOPHER_PROXY
.h2 NEWS_PROXY
.h2 NNTP_PROXY
# Lynx version 2.2 and beyond supports the use of proxy servers that can act as
# firewall gateways and caching servers. They are preferable to the older
# gateway servers. Each protocol used by Lynx can be mapped separately using
# PROTOCOL_proxy environment variables (see Lynx Users Guide). If you have 
# not set them externally, you can set them at run time via this configuration file.
# They will not override external settings. The no_proxy variable can be used
# to inhibit proxying to selected regions of the Web (see below). Note that on
# VMS these proxy variables are set as process logicals rather than symbols, to
# preserve lowercasing, and will outlive the Lynx image.
#
.ex 15
http_proxy:http://proxy3.in.ibm.com:80/
ftp_proxy:http://proxy3.in.ibm.com:80/
#http_proxy:http://penguin.in.ibm.com:8080
#ftp_proxy:http://penguin.in.ibm.com:8080/.h2 NO_PROXY
# The no_proxy variable can be a comma-separated list of strings defining
# no-proxy zones in the DNS domain name space.  If a tail substring of the
# domain-path for a host matches one of these strings, transactions with that
# node will not be proxied.
.ex
no_proxy:demiurge.in.ibm.com, demiurge</pre>
</td>
</tr>
</tbody>
</table>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="3"></a><strong><span class="atitle">Changing configuration files</span></strong></p>
<p style="text-align:justify;">When changing a configuration file, make sure that the program using that configuration is restarted if it&#8217;s not controlled by the system administrator or the kernel. A normal user doesn&#8217;t usually have privileges to start or stop system programs and/or daemons.</p>
<p style="text-align:justify;"><a name="h23606"></a><strong><span class="smalltitle">The kernel</span></strong></p>
<p style="text-align:justify;">Changing configuration files in the kernel immediately affects the system. For example, changing the passwd file to add a user immediately enables that user. Also there are some kernel tunable parameters in the /proc/sys directory on any Linux system. The write-access to all these files is given only to the super-user; other users have only readonly access. The files in this directory are classified in the same manner as the Linux kernel source. Every file in this directory represents a kernel data structure that can be dynamically modified to change the system performance.</p>
<p style="text-align:justify;"><strong>Note:</strong> Before changing any value in any of these files, make sure you know everything about the file to avoid irreparable damage to the system.<br />
<strong>Files in the /proc/sys/kernel/ directory</strong></p>
<table class="ibm-data-table" width="75%" border="1" cellspacing="0">
<tbody>
<tr>
<td align="center"><strong>File name</strong></td>
<td align="center"><strong>Description</strong></td>
</tr>
<tr>
<td>threads-max</td>
<td>The maximum number of tasks the kernel can run.</td>
</tr>
<tr>
<td>ctrl-alt-del</td>
<td>If 1, then pressing this key sequence cleanly reboots the system.</td>
</tr>
<tr>
<td>sysrq</td>
<td>If 1, then Alt-SysRq is active.</td>
</tr>
<tr>
<td>osrelease</td>
<td>Displays the release of the operating system.</td>
</tr>
<tr>
<td>ostype</td>
<td>Displays the type of the operating system.</td>
</tr>
<tr>
<td>hostname</td>
<td>The host name of the system.</td>
</tr>
<tr>
<td>domainname</td>
<td>Network domain of which the system is a part.</td>
</tr>
<tr>
<td>modprobe</td>
<td>Specifies whether modprobe should be automatically run at startup, and load the<br />
necessary modules.</td>
</tr>
</tbody>
</table>
<p style="text-align:justify;"><a name="h25700"></a><strong><span class="smalltitle">Daemons and system programs</span></strong></p>
<p style="text-align:justify;">A daemon is a program that is always running in background, quietly carrying out its task. Common ones are in.ftpd (ftp server daemon), in.telnetd (telnet server daemon), and syslogd (system logging daemon).<br />
Some daemons, while running, keep a close watch on the configuration file and reload it automatically when it changes. But most of the daemons do not reload automatically. We need to &#8220;tell&#8221; them somehow that the configuration file has changed and that it should be reloaded. This can be achieved (on Red Hat Linux systems) by restarting the services using the service command.</p>
<p style="text-align:justify;">For example, if we have changed the network configuration, we need to issue:</p>
<p><code>service network restart</code>.</p>
<p style="text-align:justify;">Note: The services are most commonly the scripts present in the /etc/rc.d/init.d/* directory and are started by the init when the system is booted. So, to restart the service you can also do the following:</p>
<p><code>/etc/rc.d/init.d/&lt;script-for-the-service&gt; start | stop | status</code><br />
start, stop, and status are the values that these scripts take as input to perform the action.</p>
<p style="text-align:justify;"><a name="h27023"></a><strong><span class="smalltitle">User programs</span></strong></p>
<p style="text-align:justify;">A user or system program reads its configuration file every time it is launched. Remember, though, that some system programs are spawned when the computer is turned on, and their behaviour depends on what they read in the configuration files in /etc/. So, the first time a user program is started, the default configuration is read from the files present in the /etc/ directory. Later, the user can customise the programs by using rc and . (dot) files as explained in the next section.</p>
<div class="ibm-alternate-rule" style="text-align:justify;">
<hr />
</div>
<p class="ibm-ind-link ibm-back-to-top" style="text-align:justify;"><a class="ibm-anchor-up-link" href="#ibm-pcon"> </a></p>
<p style="text-align:justify;"><a name="4"></a><strong><span class="atitle">User configuration files: . (dot) files and rc files</span></strong></p>
<p style="text-align:justify;">We have seen how programs can be easily configured. But what if someone does not like the way a program has been configured in /etc/? A &#8220;normal&#8221; user cannot simply go into /etc and change the configuration files; they are owned &#8212; from the filesystem&#8217;s point of view &#8212; by root! This is why most user programs define two configuration files: the first one at a &#8220;system&#8221; level, located in /etc/; and the other one, &#8220;private&#8221; to the user, that can be found in his or her home directory.</p>
<p style="text-align:justify;">For example, in my system I have installed the very useful wget utility. In /etc/ there is an /etc/wgetrc file. In my home directory, there is a file named .wgetrc, which describes my customised configuration (which will be loaded only when I, the user run the wget command). Other users may also have the .wgetrc file in their home directory (/home/other); this file will be read, of course, only when the user runs the wget command. In other words, the /etc/wgetrc file provides &#8220;default&#8221; values for wget, while the /home/xxx/.wgetrc file lists the &#8220;customisations&#8221; for a certain user. It is important to understand that this is the &#8220;general rule,&#8221; and is not necessarily true for all cases. A program like pine, for instance, does not have any files in /etc/, but only the custom configuration in the users&#8217; home directory, in a file named .pinerc. Other programs may only have a default configuration file in /etc/, and may not let users &#8220;customize&#8221; them (it&#8217;s the case with only a few of the config. files in the /etc dir.).</p>
<p style="text-align:justify;"><a name="N10297"></a><strong>Commonly used rc and . (dot) files</strong></p>
<table class="ibm-data-table" width="70%" border="1" cellspacing="0">
<tbody>
<tr align="center" valign="center">
<td align="center" valign="center"><strong>Filename</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>~/.bash_login</td>
<td>Look at &#8220;man bash&#8221;. Treated by bash like ~/.bash_profile if that doesn&#8217;t<br />
exist.</td>
</tr>
<tr>
<td>~/.bash_logout</td>
<td>Look at &#8220;man bash&#8221;.Sourced by bash login shells at exit.</td>
</tr>
<tr>
<td>~/.bash_profile</td>
<td>Sourced by bash login shells after /etc/profile.</td>
</tr>
<tr>
<td>~/.bash_history</td>
<td>The list of commands executed previously.</td>
</tr>
<tr>
<td>~/.bashrcÂ</td>
<td>Look at &#8220;man bash&#8221;. Sourced by bash non-login interactive shells<br />
(no other files are). Non-interactive shells source nothing unless BASH_ENV or ENV are set.</td>
</tr>
<tr>
<td>~/.emacs</td>
<td>Read by emacs at startup.</td>
</tr>
<tr>
<td>~/.forward</td>
</tr>
</tbody>
</table>
<p style="text-align:justify;">If this contains an e-mail address, then all mail to owner of ~ will be forwarded to that e-mail address.~/.fvwmrc ~/.fvwm2rcConfig files for fvwm and fvwm2 (the basic X Window manager).~/.hushloginLook at &#8220;man login&#8221;. Causes a &#8220;quiet&#8221; login (no mail notice, last login info,<br />
or MOD).~/.mail.rcUser init file for mail program.~/.ncftp/Directory for ncftp program; contains bookmarks, log, macros, preferences, trace. See man ncftp.<br />
The purpose of ncftp is to provide a powerful<br />
and flexible interface to the Internet standard File Transfer Protocol. It is intended to replace the<br />
stock ftp program that comes with the system.~/.profileLook at &#8220;man bash&#8221;. Treated by bash like ~/.bash_profile if that and ~/.bash_login don&#8217;t<br />
exist, and used by other Bourn-heritage shells too.~/.pinercPine configuration~/.muttrcMutt configuration~/.exrcConfiguration of vi can be controlled by this file.</p>
<p>Example: set ai sm ruler</p>
<p>Writing the above line in this file makes vi set the auto-indentation,<br />
matching brackets and displaying line number and rows-columns options.~/.vimrcDefault &#8220;Vim&#8221; configuration file. Same as .exrc.~/.gtkrcGNOME Toolkit.~/.kdercKDE configuration.~/.netrcDefault login names and passwords for ftp.~/.rhostsUsed by the r-tools: rsh, rlogin, etc. Very<br />
weak security since host impersonation is easy.</p>
<ol style="text-align:justify;">
<li>Must be owned by user (owner of ~/) or superuser.</li>
<li>Lists hosts from which users may access this account.</li>
<li>Ignored if it is a symbolic link.</li>
</ol>
<p style="text-align:justify;">~/.rpmrcSee &#8220;man rpm&#8221;. Read by rpm if /etc/rpmrc is not present.~/.signatureMessage text that will be appended automatically to the mail sent<br />
from this account.~/.twmrcConfig file for twm (<strong>T</strong>he <strong>W</strong>indow <strong>M</strong>anager).~/.xinitrcRead by X at startup (not by xinit script). Mostly starts some progs.</p>
<p>Example: exec /usr/sbin/startkde</p>
<p>If the above line is present in this file, then the KDE Window Manager is<br />
started in when the startx command is issued from this account.~/.xmodmaprcThis file is passed to the xmodmap program, and could be named anything (~/.Xmodmap and ~/.keymap.km, for example).~/.xserverrcRun by xinit as the X server if it can find X to execute.~/News/Sent-Message-IDsDefault mail history file for gnus.~/.XauthorityRead and written by xdm program to handle authorization. See the X, xdm, and xauth man pages.~/.Xdefaults,</p>
<p>~/.Xdefaults-hostnameRead by X applications during startup on hostname. If the -hostname<br />
file can&#8217;t be found, .Xdefaults is looked for.~/.XmodmapPoints to <em>.xmodmaprc</em>; Red Hat had (has) .xinitrc using this name.~/.XresourcesUsually the name for the file passed to xrdb to load the X resources<br />
database, to avoid the need for applications to read a long .Xdefaults<br />
file. (~/.Xres has been used by some.)~/mboxUser&#8217;s old mail.</p>
<p><!-- CMA ID: 11180 --> <!-- Site ID: 1 --></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/228/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=228&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2012/10/08/understanding-linux-configuration-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>
	</item>
		<item>
		<title>Top 5 Best Linux Text Editors</title>
		<link>https://redhatlinux4u.wordpress.com/2012/10/02/top-5-best-linux-text-editors/</link>
		<comments>https://redhatlinux4u.wordpress.com/2012/10/02/top-5-best-linux-text-editors/#comments</comments>
		<pubDate>Mon, 01 Oct 2012 17:10:07 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Linux Introduction]]></category>
		<category><![CDATA[Rhel 6 Covers & Notes]]></category>
		<category><![CDATA[Softwares]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nano]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=213</guid>
		<description><![CDATA[Vi / Vim Editor Vim won by a huge margin and I don’t think this is surprise to anybody. If you are new to any of the Linux text editors listed in the top 5, read the rest of the article to understand little bit more about those editors.             [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=213&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Vi / Vim Editor</strong></p>
<p> <em>Vim won by a huge margin and I don’t think this is surprise to anybody. If you are new to any of the Linux text editors listed in the top 5, read the rest of the article to understand little bit more about those editors.</em></p>
<p><a href="http://sachinfunda.files.wordpress.com/2012/10/top-linux-text-editors.jpg"><img class="size-full wp-image aligncenter" src="http://sachinfunda.files.wordpress.com/2012/10/top-linux-text-editors.jpg?w=475" alt="Image" /></a>                                    <strong>   Favorite Linux Text Editor Voting Results</strong></p>
<p> </p>
<p><strong>1. Vim Editor</strong></p>
<p><a href="http://sachinfunda.files.wordpress.com/2012/10/vim_logo.png"><img class="size-full wp-image" src="http://sachinfunda.files.wordpress.com/2012/10/vim_logo.png?w=118" alt="Image" /></a></p>
<blockquote><p>Home Page: <a href="http://www.vim.org/" rel="nofollow">http://www.vim.org/</a><br />Author: Bram Moolenaar<br />Latest Stable Version: Vim 7.2<br />Written in: C and Vim script<br />Operating System: Cross-platform (Unix, Linux and Windows)<br />Read more about Vim Editor at Wikipedia</p>
<p> </p>
</blockquote>
<p><strong>2. gEdit Editor</strong></p>
<blockquote><p><a href="http://sachinfunda.files.wordpress.com/2012/10/gedit-logo.png"><img class="size-full wp-image" src="http://sachinfunda.files.wordpress.com/2012/10/gedit-logo.png?w=290" alt="Image" /></a></p>
<p>gedit is the default text editor for the GNOME desktop environment. This is a UTF-8 compatible text editor.<br />Home Page: <a href="http://projects.gnome.org/gedit/" rel="nofollow">http://projects.gnome.org/gedit/</a><br />Latest Stable Release: 2.26.2<br />Written in: C, Python<br />Operating System: Cross-platform</p>
<p> </p>
</blockquote>
<p><strong><a href="http://sachinfunda.files.wordpress.com/2012/10/gnu-nano-logo-150x150.png">  3. Nano Editor</a></strong></p>
<blockquote><p><a href="http://sachinfunda.files.wordpress.com/2012/10/gnu-nano-logo-150x150.png">   <img class="size-full wp-image" src="http://sachinfunda.files.wordpress.com/2012/10/gnu-nano-logo-150x150.png?w=140" alt="Image" /></a></p>
<p>Home Page: <a href="http://www.nano-editor.org/" rel="nofollow">http://www.nano-editor.org/</a><br />Latest Stable Release: 2.0.9<br />Read more about Nano editor<br />Read more about gEdit at Wikipedia</p>
<p> </p>
</blockquote>
<p><strong>4. gVim Editor</strong></p>
<blockquote><p>Home Page: <a href="http://vimdoc.sourceforge.net/htmldoc/gui.html" rel="nofollow">http://vimdoc.sourceforge.net/htmldoc/gui.html</a><br />gVim is the graphical version of the famous Vim editor</p>
<p> </p>
</blockquote>
<p><strong>5. Emacs Editor</strong></p>
<blockquote><p><a href="http://sachinfunda.files.wordpress.com/2012/10/600px-emacs-logosvg-300x241.png"><img class="size-full wp-image" src="http://sachinfunda.files.wordpress.com/2012/10/600px-emacs-logosvg-300x241.png?w=290" alt="Image" /></a></p>
<p>Home Page: <a href="http://www.gnu.org/software/emacs/" rel="nofollow">http://www.gnu.org/software/emacs/</a><br />Current Stable Release: 22.3<br />First Release of Emacs was in the year 1976<br />Written in C and Emacs lisp<br />Operating System: Cross-platform<br />Read more about Emacs Editor at Wikipedia</p>
</blockquote>
<p> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/213/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=213&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2012/10/02/top-5-best-linux-text-editors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>

		<media:content url="http://sachinfunda.files.wordpress.com/2012/10/top-linux-text-editors.jpg?w=475" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>

		<media:content url="http://sachinfunda.files.wordpress.com/2012/10/vim_logo.png?w=118" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>

		<media:content url="http://sachinfunda.files.wordpress.com/2012/10/gedit-logo.png?w=290" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>

		<media:content url="http://sachinfunda.files.wordpress.com/2012/10/gnu-nano-logo-150x150.png?w=140" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>

		<media:content url="http://sachinfunda.files.wordpress.com/2012/10/600px-emacs-logosvg-300x241.png?w=290" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>UNIX Flavors (Distributions)</title>
		<link>https://redhatlinux4u.wordpress.com/2012/09/27/unix-flavors-distributions/</link>
		<comments>https://redhatlinux4u.wordpress.com/2012/09/27/unix-flavors-distributions/#comments</comments>
		<pubDate>Thu, 27 Sep 2012 14:43:16 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>
		<category><![CDATA[AIX]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[enterprise-it]]></category>
		<category><![CDATA[rhce]]></category>
		<category><![CDATA[rhcsa]]></category>
		<category><![CDATA[rhel6]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[system admin]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[unix flavors]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=189</guid>
		<description><![CDATA[Which operating system is best for web hosting? It seemed a simple enough topic, or so this web hosting novice thought. So I went through countless of sites in search of the answer and came up with a list of Web Hosting Operating Systems to choose from. Whereupon I concluded that there really wasn’t a [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=189&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;"><strong><span style="color:#ff0000;"><em>Which operating system is best for web hosting? </em></span></strong></p>
<p><span style="color:#ff6600;">It seemed a simple enough topic, or so this web hosting novice thought. So I went through countless of sites in search of the answer and came up with a list of Web Hosting Operating Systems to choose from. Whereupon I concluded that there really wasn’t a system that would prove ‘best’ for all. It was, for the most part, simply a matter of needs, and of course, of preference, both from the web host’s and the web master’s points of view. </span></p>
<p><span style="color:#ff6600;">That takes care of that! Right? Well, not quite. I realized, in the course of my research, that from this list, another ‘list’ begged to be made. A list, that seemed necessary if one were to make an informed choice when it comes to operating systems. </span></p>
<p><span style="color:#ff6600;">This list, of course, is that of the many Unix ‘flavors’ available in the market. Unless you’re an expert, or simply a fanatic, chances are the concept of Unix having &#8216;flavors’ came as a surprise. Who knew flavors could apply to things other than ice cream, or food for that matter? </span></p>
<p><span style="color:#000080;"><em>So what exactly is a Unix flavor? </em></span></p>
<p>this blog  defines it as an implementation of Unix, with each flavor, designed to work with different types of hardware, and having its own unique commands or features. The UGU site provides one of the more comprehensive lists of Unix flavors, but for those who don’t feel like going though all those links, below is an overview of the more popular ones.</p>
<p>Flavors that are available commercially (read: sold) include:</p>
<p><strong>Solaris</strong> – Sun Microsystems’ implementation, of which there are different kinds available: these are <a class="zem_slink" title="Solaris (operating system)" href="http://oracle.com/solaris" rel="homepage" target="_blank">Solaris OS</a> for SPARC platforms, Solaris OS for x86 platforms, and Trusted Solaris for both SPARC &amp; x86 platforms; the latest version is Solaris 10 OS</p>
<p><strong>AIX</strong> – short for <a class="zem_slink" title="IBM AIX" href="http://www.ibm.com/aix" rel="homepage" target="_blank">Advanced Interactive eXecutive</a>; <a class="zem_slink" title="LSE: IBM" href="http://www.google.com/finance?q=LON:IBM" rel="googlefinance" target="_blank">IBM</a>’s implementation, the latest release of which, is the AIX 5L version 5.2.</p>
<p><strong><a class="zem_slink" title="UnixWare" href="http://www.sco.com/products/unixware714/" rel="homepage" target="_blank">SCO UnixWare</a> and <a class="zem_slink" title="SCO OpenServer" href="http://www.sco.com/products/openserver6/" rel="homepage" target="_blank">OpenServer</a></strong> – are implementations derived from the original AT&amp;T Unix® source code acquired by the Santa Cruz Operation Inc. from Novell, and later on bought by Caldera Systems; the latest versions are UnixWare 7.1.3 and OpenServer 5.0.7</p>
<p><strong>BSD/OS</strong> – the <a class="zem_slink" title="Berkeley Software Distribution" href="http://en.wikipedia.org/wiki/Berkeley_Software_Distribution" rel="wikipedia" target="_blank">Berkeley Software Distribution</a> (BSD) Unix implementation from Wind River; its latest version is the BSD/OS 5.1 Internet Server Edition</p>
<p><strong>IRIX</strong> – the proprietary version of Unix from Silicon Graphics Inc.; the latest release of which is IRIX 6.5</p>
<p><strong>HP-UX</strong> – short for <a class="zem_slink" title="HP-UX" href="http://www.hp.com/go/hpux/" rel="homepage" target="_blank">Hewlett-Packard UniX</a>; the latest version is the HP-UX 11i</p>
<p><strong>Tru64 UNIX</strong> – the Unix operating environment for HP AlphaServer systems; Tru64 UNIX v5.1B-1 is the latest version</p>
<p><strong>Mac OS</strong> – Mac operating system from Apple Computer Inc. having a Unix core; the latest version is the Mac OS X Panther</p>
<p>Flavors that are available for free, include:</p>
<p><strong>FreeBSD</strong> – derived from BSD, it is an advanced OS for x86 compatible AMD64, Alpha, IA-64, PC-98 and UltraSPARC® architectures; the latest versions are FreeBSD 5.2.1 (New Technology Release) and the FreeBSD 4.9 (Production Release)</p>
<p><strong><a class="zem_slink" title="NetBSD" href="http://www.netbsd.org" rel="homepage" target="_blank">NetBSD</a></strong> – <a class="zem_slink" title="Unix-like" href="http://en.wikipedia.org/wiki/Unix-like" rel="wikipedia" target="_blank">Unix-like OS</a> derived from BSD and developed by The NetBSD Project; it is shipped under a BSD license and the latest release is NetBSD 1.6.2</p>
<p><strong>OpenBSD</strong> – multi-platform 4.4BSD-based Unix-like OS from The <a class="zem_slink" title="OpenBSD" href="http://www.openbsd.org" rel="homepage" target="_blank">OpenBSD project</a>; its latest release is OpenBSD 3.4</p>
<p><strong>Linux</strong> &#8212; a Unix-type OS originally created by Linus Torvalds, the source code of which is available freely and open for development under GNU General Public License; there are numerous Linux distributions available</p>
<p>A more detailed discussion of these flavors will be provided in future postings, so do come back soon.</p>
<p><span style="color:#993366;"><strong>NOTES: </strong></span></p>
<p><span style="color:#0000ff;"><em>Free in this case means that the software is free (to use), but does not necessarily mean that users won’t shell out money to get their own copy(ies). Suppliers may charge a nominal fee for materials used to copy/distribute these (i.e. CDs) and for shipping (if applicable).</em></span></p>
<p><span style="color:#0000ff;"><em>BSD license simply put means that users are allowed to develop products based on NetBSD without the changes having to be made public</em></span></p>
<p><span style="color:#0000ff;"><em>Although Linux has traditionally been freely available, the ongoing case by SCO against IBM and the rest of the Linux community might change this. A more detailed posting will be made on this topic in the coming days.</em></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/189/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=189&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2012/09/27/unix-flavors-distributions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>
	</item>
		<item>
		<title>Something about System Administrator</title>
		<link>https://redhatlinux4u.wordpress.com/2012/09/19/something-about-system-administartor/</link>
		<comments>https://redhatlinux4u.wordpress.com/2012/09/19/something-about-system-administartor/#comments</comments>
		<pubDate>Tue, 18 Sep 2012 18:27:05 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>
		<category><![CDATA[Linux Introduction]]></category>
		<category><![CDATA[engineer]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[redhatlinux4u]]></category>
		<category><![CDATA[rhce]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[system administrator]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=180</guid>
		<description><![CDATA[Classification of Systems: Small sites have 1 &#8211; 10 machines, all running the same OS. Usually the administrator of a small site has only about 20 users. Usually there is only one administrator for a small site.Medium sites have up to 100 machines, and may be running up to 3 different OSs. The administrator usually [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=180&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<address><strong>Classification of Systems:</strong></address>
<address>Small sites have 1 &#8211; 10 machines, all running the same OS. Usually the administrator of a small site has only about 20 users. Usually there is only one administrator for a small site.Medium sites have up to 100 machines, and may be running up to 3 different OSs. The administrator usually has about 100 users. Medium sites may have more that one administrator, either specializing in different operating systems or sharing general system administrator duties.Large sites have over 100 computers, multiple operating systems, and over 100 users. At a large site, there will be a hierarchy of administration, with the lead or senior System Administrator responsible for all of the systems and assigning duties to one or more assistant administrators.</address>
<address> </address>
<p style="text-align:justify;"><span style="color:#ff0000;"><strong>System Administration Skills:</strong></span><br />
<img class="aligncenter" src="http://rlv.zcache.com/trust_me_im_a_system_administrator_sticker-p217711029554073928envb3_400.jpg" alt="" width="400" height="400" /><br />
System administration skills can be classified in four general levels. The links below discuss the required skills, desired skills, and responsibilities of each of those levels. Following the levels are some general thoughts on system administration in general.<br />
<span style="color:#0000ff;">Novice     Junior     Intermediate/advanced Senior </span></p>
<blockquote><p><span style="color:#0000ff;">Novice System Administrator:</span></p>
<p>* Required skills:<br />
@ Has strong inter-personal and communication skills: is capable of explaining simple procedures in writing or verbally; has good phone skills.<br />
@ Is familiar with Unix and its commands/utilities at the user level. Can edit files using more than one editor. Uses at least two shells one of them being the Bourne shell.<br />
@ Can perform standard file processing tasks; find, move, remove, redirection.</p>
<p>* Required background:<br />
@ Two years of college or equivalent post-high school education or experience.</p>
<p><span style="color:#333333;">* Desirable:</span><br />
@A degree or certificat in computer science or related field.<br />
@ Previous experience in customer support, computer operations, system administration, or another related area.<br />
@ Motivated to advance in the profession.</p>
<p>* Appropriate responsibilities:<br />
@ Perform routine tasks under the direct supervision of a more experienced administrator.<br />
@ Be the front-line interface for users; accepting problem reports and passing them to the appropriate system administrators.<br />
@ Performs some security functions, especially monitoring the system</p>
<p><span style="color:#0000ff;">Junior System Administrator:</span></p>
<p>* Required skills:<br />
@Has strong inter-personal and communication skills: capable of training users in applications and Unix fundamentals. Able to write basic system and user documentation.<br />
@ High skill level with most Unix commands and utilities.<br />
@ Familiar with most basic system administration tools and tasks. For example, can cleanly boot and shutdown the system, add and remove user accounts, use backup programs, perform fsck and maintain system database files (groups, hosts, aliases, etc.)<br />
@ Fundamental understanding of the functioning of the Unix operating system: for example understands job control, hard and soft linking, the difference between shell programs and kernel programs.<br />
@ Basic understanding of Unix security procedures</p>
<p>* Required background:<br />
@ One to three years of system administration experience.</p>
<p>* Desirable:<br />
@ Degree in CS or a related field.<br />
@ Familiarity with networked/ distributed computing environments. For example: can use the route command, add a workstation to a network, or mount a remote filesystem.<br />
@ Ability to write functional scripts in an administrative language (shell, Perl, Tk).<br />
@ Some programming experience in an applicable language like C.</p>
<p>* Appropriate Responsibilities:<br />
@ Administer a small site alone, or assist in the administration of a larger site.<br />
@ Work under the general supervision of a more senior system administrator or computer systems manager.<br />
@ Perform normal security procedures, able to advise users on standard security protocol.</p>
<p><span style="color:#0000ff;">Intermediate/Advanced System Administrator</span></p>
<p>* Required Skills<br />
@ Has strong inter-personal and communication skills: capable of training users in complex topics, making presentations to internal groups. Able to write intricate system and user documentation. Capable of writing and explaining purchase justifications.<br />
@ Independent problem solving; self-directed, self-starting.<br />
@ Very comfortable with most aspects of the Unix operating system: paging/swapping, inter-process communication, devices and device driver fundamentals, file system concepts like inode and superblock.<br />
@ Familiar with fundamental networking/distributed computing environments and concepts. Can configure NFS and NIS, use nslookup or research to check information in the DNS.<br />
@ Ability to write detailed scripts in at least one, preferably two administrative lnaguages, (shell scripts, Perl, Tk).<br />
@ Ability to perform at least minimal debugging and modification of C programs.<br />
@ Ability to perform most security audits, and protect the system against intrusion.</p>
<p>* Required Background:<br />
@ Three to five years of system administration experience.</p>
<p>* Desirable:<br />
@ At least a BS in Computer Science or a related field.<br />
@ Significant programming background in any applicable language.</p>
<p>* Appropriate Responsibilities:<br />
@ Receive general instructions for new duties from supervisor.<br />
@ Administers a mid-size site alone, or assists in administration of a larger site.<br />
@ Initiates some new responsibilities and helps plan for the future of the site and network.<br />
@ Manages novice system administrators or operators.<br />
@ Evaluates and/or recommends purchases; has strong influence on the purchasing process.<br />
@ Serves as the first line of defense against intrusion and inadvertent system damage.</p>
<p><span style="color:#0000ff;">Senior System Administrator:</span></p>
<p>* Required Skills<br />
@ Strong inter-personal and communication skills; capable of writing proposals and papers, acting as a vendor liaison, making presentations to customer/client audiences or making professional presentations, work closely with upper management.<br />
@ Ability to solve problems quickly and completely.<br />
@ Ability to identify tasks which should be automated and then write tools to automate them.<br />
@ Solid understanding of the Unix based operations system: understands paging and swapping, interprocess communication, devices and device drivers, can perform system analysis and tuning.<br />
@ Ability to program in at least one, preferably two administrative languages, (shell, Perl, Tk) and port C programs from one platform to another, write small C programs.<br />
@ Solid understanding of networking/distributed computing environments, understanding the principals of routing, client/server programming, and the design of consistent network-wide filesystems.</p>
<p>* Required Background:<br />
@ More than 5 years of previous system administration experience.</p>
<p>* Desirable:<br />
@ A degree in CS or a related field. Advanced degree preferred.<br />
@ Extensive programming experience in an applicable language.<br />
@ Publications within the field of system administration.</p>
<p>* Appropriate Responsibilities:<br />
@ Design/implement complex local and wide-area networks of machines.<br />
@ Manages a large site or network.<br />
@ Works under general direction of senior management.<br />
@ Establishes/recommends policies and procedures for system use and services.<br />
@ Provides the technical lead and/or supervision for system administrators, system programmers, or others.<br />
@ Has purchasing authority and responsibility for purchase justification.</p>
<p><span style="color:#333399;">Finally, some important thoughts for system Administrators:</span><br />
<span style="color:#339966;"><span style="color:#333300;">-&gt;</span> Never do something you can&#8217;t undo.</span><br />
<span style="color:#339966;">-&gt; Always check the backups, never assume they are working. Make sure you can restore from them, too.</span><br />
<span style="color:#339966;">-&gt;Write down what you did, even if you know you will never forget it, you will.</span><br />
<span style="color:#339966;">-&gt; If you do it more than once, write a script.</span><br />
<span style="color:#339966;">-&gt; Get to know your users before there is a problem, then when there is, they will know who you are and maybe have a little understanding.</span><br />
<span style="color:#339966;">-&gt; Remember you are performing a service for your users, you don&#8217;t own the system, you just get to play with it.</span><br />
<span style="color:#339966;">-&gt; Check your backups.</span><br />
<span style="color:#339966;">-&gt; Never stop learning, there is always something you should know to make your job easier and your system more stable and secure.</span><br />
<span style="color:#339966;">-&gt; Check your backups, again.</span></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/180/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=180&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2012/09/19/something-about-system-administartor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>

		<media:content url="http://rlv.zcache.com/trust_me_im_a_system_administrator_sticker-p217711029554073928envb3_400.jpg" medium="image" />
	</item>
		<item>
		<title>5 Linux Network Monitoring Tools</title>
		<link>https://redhatlinux4u.wordpress.com/2012/09/08/5-linux-network-monitoring-tools/</link>
		<comments>https://redhatlinux4u.wordpress.com/2012/09/08/5-linux-network-monitoring-tools/#comments</comments>
		<pubDate>Sat, 08 Sep 2012 10:52:35 +0000</pubDate>
		<dc:creator>sachinfunda</dc:creator>
				<category><![CDATA[Link Pages]]></category>
		<category><![CDATA[enterprise-it]]></category>
		<category><![CDATA[linux command line]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[valid ip address]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://redhatlinux4u.wordpress.com/?p=172</guid>
		<description><![CDATA[&#160; Linux networking monitoring tools work on all networks&#8211; Linux, BSD, Mac, Unix, and Windows. Monitoring traffic on your network is only as important as the data and computers you want to protect. Understanding how to do basic network troubleshooting will save you both in wasted time and money. Every Linux operating system comes with [...]<img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=172&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p style="text-align:justify;">Linux networking monitoring tools work on all networks&#8211; Linux, BSD, Mac, Unix, and Windows.<br />
Monitoring traffic on your network is only as important as the data and computers you want to protect. Understanding how to do basic network troubleshooting will save you both in wasted time and money. Every <a class="zem_slink" title="Linux" href="http://en.wikipedia.org/wiki/Linux" rel="wikipedia" target="_blank">Linux operating system</a> comes with a number of <a class="zem_slink" title="Command-line interface" href="http://en.wikipedia.org/wiki/Command-line_interface" rel="wikipedia" target="_blank">command line</a> tools to help you diagnose a network problem. In addition, there are any number of open source tools available to help you track down pesky network issues.</p>
<p style="text-align:justify;"><em>Knowing a few simple commands and when to use them will help you get started as a network diagnostic technician. We&#8217;ll use <a class="zem_slink" title="Ubuntu (operating system)" href="http://www.ubuntu.com" rel="homepage" target="_blank">Ubuntu</a> 10.04 desktop as our test platform, although all of these work in other distros as well.</em></p>
<p style="text-align:justify;"><span style="color:#333399;"><strong>Good Old Ping</strong></span></p>
<p>If you&#8217;re uncomfortable using the Linux command line from a terminal, you might as well stop reading at this point or at least skip to the other applications. In reality, there&#8217;s nothing to be afraid of when it comes to the Linux command line, especially when it comes to diagnosing a network problem. Most commands simply display information that can help you determine what&#8217;s happening. Some will require root permissions or at least the ability to issue the sudo command.</p>
<p><a href="http://redhatlinux4u.files.wordpress.com/2012/09/ping.png"><img class=" wp-image-173 aligncenter" title="ping" src="http://redhatlinux4u.files.wordpress.com/2012/09/ping.png?w=370&#038;h=225" alt="" width="370" height="225" /></a></p>
<p style="text-align:justify;">First and foremost is the ifconfig command. Typing this at a command prompt will display information about all known network devices. In the example below you can see eth0, lo and wlan0. These correspond to a wired <a class="zem_slink" title="Ethernet" href="http://en.wikipedia.org/wiki/Ethernet" rel="wikipedia" target="_blank">Ethernet</a> device (assigned address 192.168.1.2), the lo or loopback connection, and a wireless Ethernet device (address 192.168.1.102). It also shows the mac address of the device (HWaddr) and some statistics about the traffic. This should be your first command if you&#8217;re having network troubles to see if you have a valid IP address and if you see any traffic counts or errors.</p>
<p>The ping command should be your second tool of choice to determine if your computer is communicating with the outside world. Issuing a ping command to a known address (like 4.2.2.1) will quickly show if you have connectivity or not. It will also show you the time it took for the ping command to complete. Typical ping times for a DSL-type connection should be somewhere around 50 ms.</p>
<p>After the first two you should probably use the route command. This will show a list of <a class="zem_slink" title="IP address" href="http://en.wikipedia.org/wiki/IP_address" rel="wikipedia" target="_blank">IP addresses</a> including the Destination and Gateway addresses connected to each interface along with some additional information including a Flags column. This column will have the letter G on the line associated with your default gateway. You can use this address in a ping command to determine if your machine has connectivity with the gateway.</p>
<p style="text-align:justify;">
<p style="text-align:justify;"><span style="color:#333399;"><strong><a class="zem_slink" title="EtherApe" href="http://etherape.sourceforge.net/" rel="homepage" target="_blank">EtherApe</a></strong></span></p>
<p><a href="http://redhatlinux4u.files.wordpress.com/2012/09/etherape.png"><img class=" wp-image-174 aligncenter" title="EtherApe" src="http://redhatlinux4u.files.wordpress.com/2012/09/etherape.png?w=355&#038;h=285" alt="" width="355" height="285" /></a></p>
<p style="text-align:justify;">EtherApe is available for download from the <a class="zem_slink" title="Ubuntu Software Center" href="https://wiki.ubuntu.com/SoftwareCenter" rel="homepage" target="_blank">Ubuntu Software Center</a>. It uses GNOME and libpcap to present a graphical map of all network traffic seen by the selected interface. After installation you should see the EtherApe icon under the Applications / System Tools menu. When we ran it this way, it wasn&#8217;t able to open any of the network devices as this requires root access. We were able to get it to run from the command line using sudo as follows:</p>
<p>$ sudo etherape</p>
<p>Once you have the program running it should start displaying a graphical representation of the traffic seen on the default Ethernet interface. You can select a specific device if your computer has multiple Ethernet interfaces using the Capture / Interfaces menu. EtherApe also has the ability to view data from a saved pcap file and show traffic by protocol.</p>
<p style="text-align:justify;">
<p style="text-align:justify;"><span style="color:#333399;"><strong>Nmap</strong></span></p>
<p>Nmap is a widely used security scanner tool originally released in 1997. It uses a variety of special packets to probe a network for any number of purposes including creating an IP map of addresses, determining the operating system of a specific target IP address and probing a range of IP ports at a specific address. One of the most basic issues is to do what&#8217;s called a <a class="zem_slink" title="Ping sweep" href="http://en.wikipedia.org/wiki/Ping_sweep" rel="wikipedia" target="_blank">ping sweep</a>, meaning a series of ping commands to determine what addresses have computers attached to them. This can be accomplished with the following command:</p>
<p><span style="color:#3366ff;">$ nmap -sP 192.168.1.1-255</span></p>
<p>There are a number of graphical applications available from the Ubuntu Software Center that use nmap as the engine and then display the results in a more user-friendly way. These include NmapSI4, which uses a Qt4 interface, and <a class="zem_slink" title="Nmap" href="http://nmap.org/" rel="homepage" target="_blank">Zenmap</a>.</p>
<p style="text-align:justify;">
<p style="text-align:justify;"><span style="color:#333399;"><strong><a class="zem_slink" title="Tcpdump" href="http://www.tcpdump.org/" rel="homepage" target="_blank">Tcpdump</a></strong></span></p>
<p>Capturing network traffic for further analysis is the primary function of tcpdump. Actually, the packet capturing is accomplished by libpcap while the actual presentation and analysis is done with tcpdump. Raw Ethernet data is stored in the pcap file format for further examination. This same file format is used by other packet analysis tools such as <a class="zem_slink" title="Wireshark" href="http://www.wireshark.org/" rel="homepage" target="_blank">Wireshark</a>.<br />
Email Article<br />
Print Article<br />
Share Articles</p>
<p>A typical tcpdump command to capture basic traffic would be:</p>
<p><span style="color:#3366ff;">$ sudo tcpdump <a class="zem_slink" title="Name server" href="http://en.wikipedia.org/wiki/Name_server" rel="wikipedia" target="_blank"><span style="color:#3366ff;">nS</span></a></span></p>
<p>The sudo is required to gain access to the default Ethernet device. This command will display basic information including time, source and destination addresses and packet type. It will continue displaying information in the terminal until you press control-C. Tcpdump is the best and fastest way to capture network traffic to a file. A typical command to accomplish this would be:</p>
<p><span style="color:#3366ff;">$ sudo tcpdump s w pktfile.pcap</span></p>
<p style="text-align:justify;">
<p style="text-align:justify;"><span style="color:#333399;"><strong>Wireshark</strong></span></p>
<p style="text-align:justify;"><a href="http://redhatlinux4u.files.wordpress.com/2012/09/wireshark1.png"><img class=" wp-image-175 aligncenter" title="Wireshark1" src="http://redhatlinux4u.files.wordpress.com/2012/09/wireshark1.png?w=360&#038;h=220" alt="" width="360" height="220" /></a><br />
Wireshark, formerly known as Ethereal, has become the tool of choice for many, if not most, network professionals. (Ubuntu users will find it in the Ubuntu Software Center under the Internet tab.) As with some of the other tools, we had to launch Wireshark from the command line using sudo to get it to see the available Ethernet devices. Once launched you should see a list of available interfaces on the left-hand side of the main window. Selecting one of the available interfaces or the virtual interface that collects packets from all Ethernet devices will bring up the protocol display page.</p>
<p><a href="http://redhatlinux4u.files.wordpress.com/2012/09/1288886019wireshark2.png"><img class=" wp-image-176 aligncenter" title="1288886019Wireshark2" src="http://redhatlinux4u.files.wordpress.com/2012/09/1288886019wireshark2.png?w=356&#038;h=217" alt="" width="356" height="217" /></a></p>
<p>&nbsp;</p>
<p style="text-align:justify;">Wireshark provides a wealth of information about the captured traffic along with tools to filter and display based on any number of criteria including source or destination address, protocol, or error status. The Wireshark homepage has links to video tutorials, white papers and sample data to help get you started in network sleuthing.</p>
<p><em>Linux is an ideal platform to learn network troubleshooting techniques. It offers a wide array of command line and GUI tools to analyze and visualize your network traffic.</em></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/redhatlinux4u.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/redhatlinux4u.wordpress.com/172/" /></a> <img alt="" border="0" src="https://stats.wordpress.com/b.gif?host=redhatlinux4u.wordpress.com&#038;blog=33256209&#038;post=172&#038;subd=redhatlinux4u&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://redhatlinux4u.wordpress.com/2012/09/08/5-linux-network-monitoring-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>28.669156 77.453758</georss:point>
		<geo:lat>28.669156</geo:lat>
		<geo:long>77.453758</geo:long>
		<media:content url="https://0.gravatar.com/avatar/30aa145e42c4f8af17b196c008cffab7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sachinfunda</media:title>
		</media:content>

		<media:content url="http://redhatlinux4u.files.wordpress.com/2012/09/ping.png?w=300" medium="image">
			<media:title type="html">ping</media:title>
		</media:content>

		<media:content url="http://redhatlinux4u.files.wordpress.com/2012/09/etherape.png?w=300" medium="image">
			<media:title type="html">EtherApe</media:title>
		</media:content>

		<media:content url="http://redhatlinux4u.files.wordpress.com/2012/09/wireshark1.png?w=300" medium="image">
			<media:title type="html">Wireshark1</media:title>
		</media:content>

		<media:content url="http://redhatlinux4u.files.wordpress.com/2012/09/1288886019wireshark2.png?w=300" medium="image">
			<media:title type="html">1288886019Wireshark2</media:title>
		</media:content>
	</item>
	</channel>
</rss>
