<?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"
	>

<channel>
	<title>IndianGNU.org</title>
	<atom:link href="http://www.indiangnu.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.indiangnu.org</link>
	<description>Unleash the power within!!</description>
	<pubDate>Sun, 09 Nov 2008 11:36:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Chandrayaan 1 - Indian&#8217;s first scientific mission to Moon!!</title>
		<link>http://www.indiangnu.org/2008/chandrayaan-1-indians-first-scientific-mission-to-moon/</link>
		<comments>http://www.indiangnu.org/2008/chandrayaan-1-indians-first-scientific-mission-to-moon/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 10:59:05 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[INDIA]]></category>

		<category><![CDATA[chandrayaan]]></category>

		<category><![CDATA[isro]]></category>

		<category><![CDATA[moon mission]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=400</guid>
		<description><![CDATA[
Dear All ISROs,
Congratulation for carrying  out Chandrayaan 1 (moon ) mission successfully!!
you guys really rock!! we are proud of you!!
For more information please visit -
http://www.isro.org/chandrayaan/
http://en.wikipedia.org/wiki/Chandrayaan_1
Thank you,
Arun Bagul
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="http://www.indiangnu.org/wp-content/uploads/2008/chandrayaan.png" alt="" width="610" height="90" /></p>
<p>Dear All ISROs,</p>
<p>Congratulation for carrying  out <strong>Chandrayaan 1</strong> (moon ) mission successfully!!<br />
you guys really rock!! we are proud of you!!</p>
<p>For more information please visit -</p>
<p><a title="http://www.isro.org/chandrayaan/" href="http://www.isro.org/chandrayaan/" target="_blank">http://www.isro.org/chandrayaan/</a></p>
<p><a title="http://en.wikipedia.org/wiki/Chandrayaan_1" href="http://en.wikipedia.org/wiki/Chandrayaan_1" target="_blank">http://en.wikipedia.org/wiki/Chandrayaan_1</a></p>
<p>Thank you,</p>
<p>Arun Bagul</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/chandrayaan-1-indians-first-scientific-mission-to-moon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>IndianGNU.org - second anniversary!!</title>
		<link>http://www.indiangnu.org/2008/indiangnuorg-second-anniversary/</link>
		<comments>http://www.indiangnu.org/2008/indiangnuorg-second-anniversary/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 13:43:06 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[General information]]></category>

		<category><![CDATA[Arun Bagul]]></category>

		<category><![CDATA[free software]]></category>

		<category><![CDATA[GNU]]></category>

		<category><![CDATA[Indian GNU]]></category>

		<category><![CDATA[IndianGNU]]></category>

		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=372</guid>
		<description><![CDATA[Dear All,
We are celebrating the second anniversary of IndianGNU.org community!! Many many thanks to all Contributors&#8230;
Thank you,
IndianGNU community












]]></description>
			<content:encoded><![CDATA[<p>Dear All,</p>
<p>We are celebrating the <strong>second anniversary</strong> of <strong>IndianGNU.org</strong> community!! Many many thanks to all <a title="http://www.indiangnu.org/contributors" href="http://www.indiangnu.org/contributors" target="_blank">Contributors</a>&#8230;</p>
<p>Thank you,<br />
IndianGNU community<strong><br />
</strong></p>
<table border="0" width="100%">
<tbody>
<tr>
<td width="20%">
<p><div class="wp-caption aligncenter" style="width: 272px"><img title="IndianGNU logo" src="http://www.indiangnu.org/main/images/indianGNU.org.png" alt="IndianGNU logo" width="262" height="67" /><p class="wp-caption-text"> </p></div></td>
<td width="10%"></td>
<td width="70%">
<p><div class="wp-caption aligncenter" style="width: 126px"><img src="http://www.indiangnu.org/main/images/openlsm.png" alt="" width="116" height="92" /><p class="wp-caption-text"> </p></div></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/indiangnuorg-second-anniversary/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to install Oracle on Ubuntu 8.04</title>
		<link>http://www.indiangnu.org/2008/how-to-install-oracle-on-ubuntu-804/</link>
		<comments>http://www.indiangnu.org/2008/how-to-install-oracle-on-ubuntu-804/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 10:28:27 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[General information]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=398</guid>
		<description><![CDATA[Introduction - 
 
]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction - </strong></p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/how-to-install-oracle-on-ubuntu-804/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to  create, copy and burn or write  ISO image</title>
		<link>http://www.indiangnu.org/2008/how-to-create-copy-and-burn-or-write-iso-image/</link>
		<comments>http://www.indiangnu.org/2008/how-to-create-copy-and-burn-or-write-iso-image/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 07:15:02 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[Linux commands]]></category>

		<category><![CDATA[UNIX/Linux]]></category>

		<category><![CDATA[cd]]></category>

		<category><![CDATA[iso image]]></category>

		<category><![CDATA[mkisofs and cdrecord  commands]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=359</guid>
		<description><![CDATA[Introduction - 
An ISO 9660 is file system for CD-ROM media. Which is published (defined) by the International Organization for Standardization (ISO). ISO image is an archive file (disk image) of an optical disc (like CD) using a conventional ISO 9660 format that is widely supported by many OS and software.
1] How copy  data from [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction - </strong></p>
<p>An<strong> ISO 9660</strong> is file system for CD-ROM media. Which is published (defined) by the International Organization for Standardization (ISO). <strong>ISO image</strong> is an archive file (disk image) of an optical disc (like CD) using a conventional ISO 9660 format that is widely supported by many OS and software.</p>
<p><strong>1] How copy  data from ISO image - </strong></p>
<p>I just downloaded opensolaris ISO  image. and wanted copy data from iso image.</p>
<p><strong>step 1)</strong> I downloaded the image in /opensolaris  directory</p>
<p>root@arun:/opensolaris# ls -l<br />
total 700768<br />
-rw-r&#8211;r&#8211; 1 root root 716881920 2008-08-26 06:21 opensolaris-200805.iso<br />
root@arun:/opensolaris#</p>
<p><strong>step 2)</strong> mount the ISO image  as  shown below -</p>
<p>root@arun:/opensolaris# <strong>mount -o  loop  /opensolaris/opensolaris-200805.iso   /mnt/</strong><br />
root@arun:/opensolaris#</p>
<p><strong>* Check mount point&#8230;</strong></p>
<p>root@arun:/mnt# <strong>mount  | grep iso</strong><br />
/opensolaris/opensolaris-200805.iso on /mnt type iso9660 (rw,loop=/dev/loop0)<br />
root@arun:/mnt#</p>
<p><strong>step 3)</strong> Go to  mounted directory ie /mnt (in my case) -</p>
<p>root@arun:/opensolaris# cd /mnt/<br />
root@arun:/mnt# ls<br />
bin     boot  bootcd_microroot  COPYRIGHT  dev  devices  jack  LICENSE  mnt  platform  proc<br />
reconfigure  root  solarismisc.zlib  solaris.zlib  system  tmp<br />
root@arun:/mnt#</p>
<p><strong>2] How to create ISO image -</strong></p>
<p>a) using <strong>dd</strong> command  we can create iso image of CD</p>
<p><strong>dd if=/dev/cdrom  of=/tmp/mycdimgage.iso</strong></p>
<p>b) using <strong>mkisofs </strong>command we can create iso image of our data in any directories <strong></strong></p>
<p><strong>** mkisofs command - </strong></p>
<ul></ul>
<p>-R, -rock                               Generate Rock Ridge directory information<br />
-o FILE, -output FILE             Set output ISO file name<br />
-l, -full-iso9660-filenames    Allow full 31 character filenames for ISO9660 names<br />
-max-iso9660-filenames      Allow 37 character filenames for ISO9660 names (violates ISO9660)<br />
-input-charset CHARSET      Local input character for file name conversion<br />
-output-charset CHARSET   Output character set for file name conversion</p>
<p>root@arun:~# <strong>mkisofs  -input-charset utf-8  -R -o  /tmp/mycdimage.iso  /mnt/</strong><br />
1.43% done, estimate finish Sun Oct 10 17:53:05 2008<br />
2.86% done, estimate finish Sun Oct 10 17:52:30 2008<br />
&#8230;<br />
&#8230;.<br />
98.56% done, estimate finish Sun Oct 10 17:52:25 2008<br />
Total translation table size: 0<br />
Total rockridge attributes bytes: 22651<br />
Total directory bytes: 159744<br />
Path table size(bytes): 1024<br />
Max brk space used 21000<br />
350039 extents written (683 MB)<br />
root@arun:~#</p>
<p><strong>* checking the Size of ISO image of /mnt directory </strong></p>
<p>root@arun:~# <strong>du -sh /tmp/mycdimage.iso</strong><br />
685M    /tmp/mycdimage.iso<br />
root@arun:~#</p>
<p><strong>3] How Burn (copy) ISO image to CD -</strong></p>
<p><strong>cdrecord</strong> is the command line tool to burn or write  iso image file to CD <strong></strong></p>
<p><strong>** cdrecord command -</strong></p>
<ul></ul>
<p>-v                       Verbose i.e show info while burning the disk<br />
-dev=0,0,0        Device number<br />
-multi                 Start multi session disk<br />
-data                  This option required for HP and Sony CD Writer only.<br />
-scanbus            scan the SCSI and IDE buses and exit<br />
-dummy             do everything with laser turned off<br />
-eject                  Ejects the CD when Done<br />
-speed=12                  Writing speed (12x )<br />
-msinfo                        retrieve multi-session info for genisoimage<br />
timeout=                     set the default SCSI command timeout to<br />
/tmp/mycdimage.iso   Name of iso image  which to be burned</p>
<p><strong>* How  to  get Device number ?</strong></p>
<p>root@arun:~# <strong>cdrecord -scanbus </strong><br />
scsibus3:<br />
3,0,0   300) &#8216;MATSHITA&#8217; &#8216;UJDA775 DVD/CDRW&#8217; &#8216;1.00&#8242; Removable CD-ROM<br />
&#8230;.<br />
root@arun:~#</p>
<p>root@arun:~# <strong>cdrecord -dev=3,0,0 -multi -data -v -eject -speed=4 /tmp/mycdimage.iso</strong></p>
<p><strong>NOTE - above device naming convention doesn&#8217;t work in Ubuntu use device  file directly&#8230;</strong></p>
<p>root@arun:~#<strong> cdrecord  -dev=/dev/cdrom  -multi -data -v -eject -speed=4 /tmp/mycdimage.iso</strong><br />
&#8230;<br />
TOC Type: 1 = CD-ROM<br />
scsidev: &#8216;/dev/cdrom&#8217;<br />
devname: &#8216;/dev/cdrom&#8217;<br />
scsibus: -2 target: -2 lun: -2<br />
Linux sg driver version: 3.5.27<br />
Wodim version: 1.1.6<br />
&#8230;<br />
&#8230;.<br />
communication breaks or freezes immediately after that.<br />
FIFO size      : 12582912 = 12288 KB<br />
Track 01: data     0 MB         padsize:  242 KB<br />
Total size:        0 MB (00:04.02) = 302 sectors<br />
Lout start:        1 MB (00:06/02) = 302 sectors</p>
<p>root@arun:~#</p>
<p>** Hey, just mount the CD and see</p>
<p><strong>NOTE -</strong> <a title="http://www.gnome.org/projects/brasero/" href="http://www.gnome.org/projects/brasero/" target="_blank"><strong>Brasero CD burning</strong></a> (<a title="http://www.gnome.org/projects/brasero/" href="http://www.gnome.org/projects/brasero/" target="_blank">http://www.gnome.org/projects/brasero/</a>) - GNOME tool for writing/burning CD is included in Ubuntu 8.04!!</p>
<p>Thank you,<br />
Arun Bagul</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/how-to-create-copy-and-burn-or-write-iso-image/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to read  MBR (Master Boot Record)</title>
		<link>http://www.indiangnu.org/2008/how-to-read-mbr-master-boot-record/</link>
		<comments>http://www.indiangnu.org/2008/how-to-read-mbr-master-boot-record/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 13:14:53 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[General information]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=347</guid>
		<description><![CDATA[1] What is MBR ?
Master Boot Record (MBR) is the 512-byte  boot sector (first sector) of a your a Hard Disk Drive (HDD). MBR contains -
1) Primary Partition table
2) Boot Loader (GRUB/LILO etc)

*** Total Size of MBR is 512 byte and which is divided as shown below&#8230;
1) Boot Loader (code) - 446 byte
2) Primary partion [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1] What is MBR ?</strong></p>
<p>Master Boot Record (MBR) is the 512-byte  boot sector (first sector) of a your a Hard Disk Drive (HDD). MBR contains -<br />
<strong>1) Primary Partition table<br />
2) Boot Loader (GRUB/LILO etc)<br />
</strong><br />
*** Total Size of MBR is <strong>512 byte</strong> and which is divided as shown below&#8230;</p>
<p>1) Boot Loader (code) -<strong> 446 byte</strong><br />
2) Primary partion table - <strong>64 byte (16 byte * 4)</strong><br />
3) Disk signature &amp; others - 6 byte<br />
4) MBR signature - 2 byte</p>
<p><strong>2] Disk Partitioning -</strong> There are two methods/schemes of Disk partitioning</p>
<p><strong>a) MBR Partition Table<br />
b) GUID Partition Table<br />
</strong><br />
When a Hard Disk is partitioned with the MBR Partition Table scheme - MBR contains the primary partition entries. Maximum <strong>four (4) primary partition</strong> or <strong>three (3) primary partition and one extended partition</strong> can be created. The partition table entries for other secondary partitions are stored in Extended Partition Table. In extended partition, we can create <strong>128 logical partitions</strong>.</p>
<p>When a Hard Disk is partitioned with the GUID Partition Table scheme - the Master Boot Record will still contain a partition table, but its only purpose is to indicate the existence of the GUID Table</p>
<p><strong>3] How to read  MBR (Master Boot Record)</strong></p>
<p>root@indiangnu:/home/arun# <strong>dd if=/dev/sda  of=/home/arun/MBR.details bs=512 count=1 </strong><br />
1+0 records in<br />
1+0 records out<br />
512 bytes (512 B) copied, 0.00014018 s, 3.7 MB/s<br />
root@indiangnu:/home/arun#</p>
<p>root@indiangnu:/home/arun# <strong>ls -shl   /home/arun/MBR.details</strong><br />
4.0K -rw-r&#8211;r&#8211; 1 root root <strong>512</strong> 2008-09-28 17:57 /home/arun/MBR.details<br />
root@indiangnu:/home/arun#</p>
<p>** The size of file is 512 byte and it is in binary format</p>
<p><strong>command(1) - od </strong></p>
<p>od command dump files in octal or other format<br />
# od [options] file_name</p>
<p>Options<br />
-a  select named characters, ignoring high-order bit<br />
-b  select octal bytes<br />
-c  select ASCII characters or backslash escapes<br />
-i  select decimal ints<br />
-x  select hexadecimal 2-byte units</p>
<p>** How to convert Binary MBR file data in other format like Hexadecimal format -</p>
<p>arun@indiangnu:~$ <strong>od -x /home/arun/MBR.details </strong><br />
0000000 48eb d090 00bc fb7c 0750 1f50 befc 7c1b<br />
0000020 1bbf 5006 b957 01e5 a4f3 bdcb 07be 04b1<br />
0000040 6e38 7c00 7509 8313 10c5 f4e2 18cd f58b<br />
0000060 c683 4910 1974 2c38 f674 b5a0 b407 0203<br />
0000100 00ff 2000 0001 0000 0200 90fa f690 80c2<br />
0000120 0275 80b2 59ea 007c 3100 8ec0 8ed8 bcd0<br />
0000140 2000 a0fb 7c40 ff3c 0274 c288 be52 7d7f<br />
0000160 34e8 f601 80c2 5474 41b4 aabb cd55 5a13<br />
0000200 7252 8149 55fb 75aa a043 7c41 c084 0575<br />
0000220 e183 7401 6637 4c8b be10 7c05 44c6 01ff<br />
0000240 8b66 441e c77c 1004 c700 0244 0001 8966<br />
0000260 085c 44c7 0006 6670 c031 4489 6604 4489<br />
0000300 b40c cd42 7213 bb05 7000 7deb 08b4 13cd<br />
0000320 0a73 c2f6 0f80 ea84 e900 008d 05be c67c<br />
0000340 ff44 6600 c031 f088 6640 4489 3104 88d2<br />
0000360 c1ca 02e2 e888 f488 8940 0844 c031 d088<br />
0000400 e8c0 6602 0489 a166 7c44 3166 66d2 34f7<br />
0000420 5488 660a d231 f766 0474 5488 890b 0c44<br />
0000440 443b 7d08 8a3c 0d54 e2c0 8a06 0a4c c1fe<br />
0000460 d108 6c8a 5a0c 748a bb0b 7000 c38e db31<br />
0000500 01b8 cd02 7213 8c2a 8ec3 4806 607c b91e<br />
0000520 0100 db8e f631 ff31 f3fc 1fa5 ff61 4226<br />
0000540 be7c 7d85 40e8 eb00 be0e 7d8a 38e8 eb00<br />
0000560 be06 7d94 30e8 be00 7d99 2ae8 eb00 47fe<br />
0000600 5552 2042 4700 6f65 006d 6148 6472 4420<br />
0000620 7369 006b 6552 6461 2000 7245 6f72 0072<br />
0000640 01bb b400 cd0e ac10 003c f475 00c3 0000<br />
0000660 0000 0000 0000 0000 a328 228b 0000 0180<br />
0000700 0001 fe07 ffff 003f 0000 1637 0271 0000<br />
0000720 ffc1 fe07 ffff 1676 0271 0d7a 0177 fe00<br />
0000740 ffff fe83 ffff 23f0 03e8 f10c 0002 0000<br />
0000760 ffc1 fe05 ffff 14fc 03eb cfc5 0565 aa55<br />
0001000<br />
arun@indiangnu:~$</p>
<p>** you can also use following command</p>
<p>arun@indiangnu:~$ <strong>od -ax /home/arun/MBR.details </strong></p>
<p>Thank you,<br />
Arun Bagul</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/how-to-read-mbr-master-boot-record/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bash Shell introduction</title>
		<link>http://www.indiangnu.org/2008/bash-shell-introduction/</link>
		<comments>http://www.indiangnu.org/2008/bash-shell-introduction/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 12:23:19 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[UNIX/Linux]]></category>

		<category><![CDATA[bash]]></category>

		<category><![CDATA[command types]]></category>

		<category><![CDATA[GNU]]></category>

		<category><![CDATA[Indian]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=355</guid>
		<description><![CDATA[Hi!! All,
This PDF   is about BASH shell , Introduction to Bash shell , How command is executed in Bash shell, types of commands  etc  Please  click  here to download&#8230;
URL - http://www.slideshare.net/arunbagul/bash-shell-introduction-by-arun-bagul-presentation/
-Arun
]]></description>
			<content:encoded><![CDATA[<p>Hi!! All,</p>
<p><span class="black_small_text">This PDF   is about BASH shell , Introduction to Bash shell , How command is executed in Bash shell, types of commands  etc  Please  click  <a title="Bash shell indroduction by Arun Bagul" href="http://www.slideshare.net/arunbagul/bash-shell-introduction-by-arun-bagul-presentation/" target="_blank">here to download&#8230;</a></span></p>
<p>URL - <a title="Bash shell indroduction by Arun Bagul" href="http://www.slideshare.net/arunbagul/bash-shell-introduction-by-arun-bagul-presentation/" target="_blank">http://www.slideshare.net/arunbagul/bash-shell-introduction-by-arun-bagul-presentation/</a></p>
<p>-Arun</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/bash-shell-introduction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Script for checking CPULOAD and send email to admin</title>
		<link>http://www.indiangnu.org/2008/script-for-checking-cpuload-and-send-email-to-admin/</link>
		<comments>http://www.indiangnu.org/2008/script-for-checking-cpuload-and-send-email-to-admin/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 09:31:52 +0000</pubDate>
		<dc:creator>Ravi Bhure</dc:creator>
		
		<category><![CDATA[Shell scripting]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=343</guid>
		<description><![CDATA[This script is very useful for system admins, it checks Cpuload and get info of which process takes the cpuload, if cpuload is or above 70%  it sends alert email to admin
==============================
#!/bin/bash
# Shell script to monitor or watch the high cpu-load
# It will send an email to $ADMIN, if the (cpu load is in %) [...]]]></description>
			<content:encoded><![CDATA[<p>This script is very useful for system admins, it checks Cpuload and get info of which process takes the cpuload, if cpuload is or above 70%  it sends alert email to admin</p>
<p>==============================</p>
<p>#!/bin/bash<br />
# Shell script to monitor or watch the high cpu-load<br />
# It will send an email to $ADMIN, if the (cpu load is in %) percentage<br />
# of cpu-load is &gt;= 70%<br />
# If you have any suggestion or question please email to ravi&lt;at&gt;indiangnu &lt;dot&gt; org<br />
# set admin email so that you can get email<br />
# set alert level 70% is default<br />
# you can set it to string LOAD with your value</p>
<p>AWK=/bin/awk<br />
SAR=/usr/bin/sar<br />
GREP=/bin/grep<br />
TR=/usr/bin/tr<br />
HEAD=/usr/bin/head<br />
PS=/bin/ps<br />
SORT=/bin/sort<br />
HOSTNAME=indiangnu.org<br />
SED=/bin/sed<br />
LOAD=70<br />
CAT=/bin/cat<br />
MAILFILE=/tmp/mailviews$$<br />
MAILER=/bin/mail<br />
mailto=&#8221;ravi@indiangnu.org&#8221;<br />
for path in $PATHS<br />
do<br />
CPU_LOAD=`$SAR -P ALL 1 2 | $GREP &#8216;Average.*all&#8217; | $AWK -F&#8221; &#8221; &#8216;{ print 100.0 -$NF}&#8217;`<br />
echo $CPU_LOAD<br />
if [[ $CPU_LOAD &gt; $LOAD ]];<br />
then<br />
PROC=`$PS -eo pcpu,pid -o comm= | $SORT -k1 -n -r | $HEAD -1`<br />
echo &#8220;Please check your processess on ${HOSTNAME} the value of cpu load is $CPU_LOAD % &amp; $PROC&#8221; &gt; $MAILFILE<br />
$CAT $MAILFILE | $MAILER -s &#8220;CPU Load is $CPU_LOAD % on ${HOSTNAME}&#8221; $mailto<br />
fi<br />
done</p>
<p>=============================</p>
<p>After  end of  schedule cron job for this script like below</p>
<p>*/30 * * * * /bin/sh /root/cpuload.sh &gt;/dev/null 2&gt;&amp;1</p>
<p>Thanks</p>
<p>Ravi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/script-for-checking-cpuload-and-send-email-to-admin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to smarthost on linux using sendmail</title>
		<link>http://www.indiangnu.org/2008/how-to-smarthost-on-linux-using-sendmail/</link>
		<comments>http://www.indiangnu.org/2008/how-to-smarthost-on-linux-using-sendmail/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 11:04:49 +0000</pubDate>
		<dc:creator>Ravi Bhure</dc:creator>
		
		<category><![CDATA[Redhat &amp; Fedora]]></category>

		<category><![CDATA[Sendmail &amp; Postfix]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=339</guid>
		<description><![CDATA[This will describe you how to set up a smarthost using  sendmail. This is to send emails using your
linux server as your smtp server, and it will use your ISP email server to send all your emails through it, to the final users.
For setting up smarthost you have to add open relay smtp in [...]]]></description>
			<content:encoded><![CDATA[<p>This will describe you how to set up a smarthost using  sendmail. This is to send emails using your<br />
linux server as your smtp server, and it will use your ISP email server to send all your emails through it, to the final users.</p>
<p>For setting up smarthost you have to add open relay smtp in your /etc/hosts<br />
111.111.111.111  smtp.yourdomain.com<br />
222.222.222.222  smtp.yourdomain.com</p>
<p>Now open /etc/mail/sendmail.mc<br />
and find SMART_HOST<br />
edit with your smtp domain, example below</p>
<p>define(`SMART_HOST&#8217;, `smtp.yourdomain.com&#8217;)dnl</p>
<p>now add belows 4 line  at the end of /etc/mail/sendmail.mc above &#8220;MAILER(smtp)dnl&#8221;</p>
<p>FEATURE(masquerade_envelope)dnl<br />
FEATURE(`genericstable&#8217;)dnl<br />
GENERICS_DOMAIN(`localhost.localdomain&#8217;)dnl<br />
FEATURE(`authinfo&#8217;, `hash /etc/mail/authinfo&#8217;)</p>
<p>save and close the sendmail.mc file</p>
<p>Now follow the steps below</p>
<p>$ vi /etc/mail/genericstable<br />
root    ravi@yourdomain.com</p>
<p>arun   arun@yourdomain.com</p>
<p>list your users, default is root, save and exit</p>
<p>now run the following command.<br />
$ makemap hash /etc/mail/genericstable &lt; /etc/mail/genericstable</p>
<p>$ vi /etc/init.d/authinfo<br />
AuthInfo:smtp.yourdomain.com &#8220;U:arun@smtp.yourdomain.com&#8221; &#8220;I:arun&#8221; &#8220;P:password&#8221; &#8220;M:LOGIN PLAIN&#8221;</p>
<p>save and exit authinfo and run<br />
makemap hash /etc/mail/authinfo &lt; /etc/mail/authinfo<br />
chmod 600 /etc/mail/authinfo</p>
<p>Now apply all changes to sendmail.cf to run following command</p>
<p>$ make -C /etc/mail</p>
<p>and last restart the sendmail service<br />
service sendmail restart ; chkconfig sendmail on</p>
<p>Now you can send emails from command line using your external smtp server.</p>
<p>Thanks</p>
<p>Ravi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/how-to-smarthost-on-linux-using-sendmail/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Happy Independence Day!!</title>
		<link>http://www.indiangnu.org/2008/happy-independence-day/</link>
		<comments>http://www.indiangnu.org/2008/happy-independence-day/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 05:10:20 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[General information]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/?p=318</guid>
		<description><![CDATA[

- IndianGNU.org

]]></description>
			<content:encoded><![CDATA[<p align="justify">
<p align="justify"><img class="alignnone" title="15-aug" src="http://www.indiangnu.org/wp-content/uploads/2008/15-aug-2008.jpg" alt="" width="717" height="472" /></p>
<p><strong>- IndianGNU.org</strong></p>
<p align="justify">
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/happy-independence-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TATA Indicom datacard (Huawei cdma) on Linux/Ubuntu!!</title>
		<link>http://www.indiangnu.org/2008/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/</link>
		<comments>http://www.indiangnu.org/2008/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 06:44:24 +0000</pubDate>
		<dc:creator>Arun Bagul</dc:creator>
		
		<category><![CDATA[Linux Networking]]></category>

		<guid isPermaLink="false">http://www.indiangnu.org/2008/07/21/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/</guid>
		<description><![CDATA[Introduction -  Two days back I brought TATA Indicom datacard! As I am Ubuntu user. I wanted to use this datacard on Ubuntu Linux!  PPP is the Point to Point protocol used for establishing internet links over dial-up modems, DSL connections, and many other types of point-to-point links. The pppd daemon works together with the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction -  </strong>Two days back I brought <strong>TATA Indicom datacard!</strong> As I am <strong>Ubuntu</strong> user. I wanted to use this datacard on Ubuntu Linux!  <strong>PPP is the Point to Point protocol</strong> used for establishing internet links over<strong> dial-up modems, DSL connections, </strong>and many other types of<strong> point-to-point links</strong>. The <strong>pppd daemon</strong> works together with the kernel PPP driver to establish and maintain a PPP link with another system (called the<strong> peer</strong>) and to  negotiate<strong> Internet Protocol (IP)</strong> <strong>addresses</strong> for each end of the link. <strong>pppd daemon</strong> can also authenticate the peer and/or supply authentication information to the peer.</p>
<p><strong>What you need to use Tataindicom datacard on Ubuntu Linux ?</strong></p>
<p>make sure that two kernel module ie &#8216;<strong>usbserial</strong>&#8216; and &#8216;<strong>usbcore</strong>&#8216; are loaded!</p>
<p>root@arun:~# <strong>modinfo usbserial</strong><br />
filename:       /lib/modules/2.6.24-16-generic/kernel/drivers/usb/serial/usbserial.ko<br />
license:        GPL<br />
description:    USB Serial Driver core<br />
author:         Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/<br />
srcversion:     FE4A4FC2C18B17DDD77E8C6<br />
depends:        usbcore<br />
vermagic:       2.6.24-16-generic SMP mod_unload 586<br />
parm:           vendor:User specified USB idVendor (ushort)<br />
parm:           product:User specified USB idProduct (ushort)<br />
parm:           debug:Debug enabled or not (bool)<br />
root@arun:~#</p>
<p>root@arun:~# <strong>modinfo usbcore</strong><br />
filename:       /lib/modules/2.6.24-16-generic/kernel/drivers/usb/core/usbcore.ko<br />
license:        GPL<br />
srcversion:     E8DACA0029626C336D1A513<br />
alias:          usb:v*p*d*dc*dsc*dp*ic09isc*ip*<br />
alias:          usb:v*p*d*dc09dsc*dp*ic*isc*ip*<br />
depends:<br />
vermagic:       2.6.24-16-generic SMP mod_unload 586<br />
parm:           usbfs_snoop:true to log all usbfs traffic (bool)<br />
parm:           blinkenlights:true to cycle leds on hubs (bool)<br />
parm:           old_scheme_first:start with the old device initialization scheme (bool)<br />
parm:           use_both_schemes:try the other device initialization scheme if the first one fails (bool)<br />
parm:           autosuspend:default autosuspend delay (int)<br />
root@arun:~#</p>
<p><strong>*</strong> To use datacard (which is ppp link) you need to install two packages ie <strong>ppp daemon</strong> and <strong>wvdial</strong> as dialer!</p>
<p>root@arun:~# <strong>dpkg -l | grep  wvdial</strong><br />
ii  wvdial                                     1.60.1                             PPP dialer with built-in intelligence<br />
root@arun:~# <strong>dpkg -l | grep  ppp</strong><br />
ii  ppp                                        2.4.4rel-9ubuntu2                  Point-to-Point Protocol (PPP) daemon<br />
ii  pppconfig                                  2.3.17ubuntu1                      A text menu based utility for configuring pp<br />
ii  pppoeconf                                  1.17ubuntu1                        configures PPPoE/ADSL connections<br />
root@arun:~#</p>
<p>on Ubuntu you need to install above packages</p>
<p><strong>How to configure ? - </strong></p>
<p><strong>&#8221; wvdialconf</strong> &#8221; command is available on Ubuntu, which will  detect you modem and it&#8217;s related stuff  and  this command will generate or updates the configuration file &#8220;<strong>/etc/wvdial.conf</strong>&#8221;</p>
<p>root@arun:~# <strong>wvdialconf </strong><br />
root@arun:~#</p>
<p><strong>*</strong> After running above command just update <strong>user name</strong> and <strong>password</strong> in &#8220;<strong>/etc/wvdial.conf</strong>&#8221; configuration file</p>
<p>root@arun:~# <strong>cat /etc/wvdial.conf</strong></p>
<p>[Dialer Defaults]<br />
Init1 = ATZ<br />
Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0<br />
Modem Type = Analog Modem<br />
Phone = Phone_number like (#xxx)<br />
ISDN = 0<br />
Username = <strong>USERNAME</strong><br />
Password = <strong>PASSWORD</strong><br />
New PPPD = yes<br />
Modem = /dev/ttyUSB0<br />
Baud = 9600<br />
root@arun:~#</p>
<p>** you can also edit this file manually just refer the man pages for more details!</p>
<p>root@arun:~# <strong>man wvdialconf </strong><br />
root@arun:~# <strong>man wvdial.conf</strong></p>
<p>arun@arun:~$ <strong>man wvdial</strong></p>
<p>root@arun:~# <strong>cat /etc/wvdial.conf</strong></p>
<p>[Dialer TataIndicom]<br />
Stupid Mode = 1<br />
Inherits = Modem0<br />
New PPPD = yes<br />
Phone = Phone_number like (#xxx)<br />
Username = USERNAME<br />
Password = PASSWORD</p>
<p>[Modem0]<br />
Init1 = ATZ<br />
SetVolume = 0<br />
Modem Type = Analog Modem<br />
Modem = /dev/ttyUSB0<br />
Dial Command = ATDT<br />
Baud = 115200 or 9600 (depends on support)<br />
FlowControl = Hardware (CRTSCTS)</p>
<p>root@arun:~#</p>
<p><strong>** How to use it or dial!!</strong></p>
<p><strong>1)</strong> Now it&#8217;s time to check your luck! If you are using <strong>default conf</strong> file created by &#8221; <strong>wvdialconf</strong> &#8221; command just use below command&#8230;</p>
<p>root@arun:~#  <strong>wvdial &gt; /var/log/tataindicom.log  2&gt;&amp;1</strong> <strong> &amp;</strong></p>
<p>OR<br />
root@arun:~# <strong>wvdial</strong></p>
<p>&#8230;..<br />
root@arun:~#</p>
<p>root@arun:~# <strong>tail -f /var/log/tataindicom.log </strong><br />
OK<br />
&#8211;&gt; Sending: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0<br />
ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0<br />
OK<br />
&#8211;&gt; Modem initialized.<br />
&#8211;&gt; Sending: ATDT#***<br />
&#8211;&gt; Waiting for carrier.<br />
ATDT#777<br />
CONNECT 230400<br />
&#8211;&gt; Carrier detected.  Waiting for prompt.</p>
<p>&#8211;&gt; Don&#8217;t know what to do!  Starting pppd and hoping for the best.<br />
&#8211;&gt; Starting pppd at Sat Jun 20 21:56:51 2008<br />
&#8211;&gt; Pid of pppd: 7152<br />
&#8211;&gt; Using interface ppp0<br />
&#8211;&gt; pppd: X�[06][08]��[06][08]<br />
&#8211;&gt; local  IP address 219.80.X.X<br />
&#8211;&gt; pppd: X�[06][08]��[06][08]<br />
&#8211;&gt; remote IP address 173.B.C.D<br />
&#8230;.<br />
&#8230;..<br />
root@arun:~#</p>
<p><strong>2)</strong> If you have manually edited your conf file as shown above then use below command</p>
<p>root@arun:~# <strong> wvdial TataIndicom</strong><br />
..<br />
&#8230;.<br />
root@arun:~#</p>
<p><strong>** Now check ppp0 interface is available</strong></p>
<p>root@arun:~# <strong>ifconfig </strong><br />
eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX<br />
UP BROADCAST MULTICAST  MTU:1500  Metric:1<br />
RX packets:4 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:1000<br />
RX bytes:256 (256.0 B)  TX bytes:492 (492.0 B)<br />
Base address:0&#215;4020 Memory:e4600000-e4620000</p>
<p><strong>ppp0      Link encap:Point-to-Point Protocol<br />
inet addr:219.80.X.X  P-t-P:173.B.C.D  Mask:255.255.255.255<br />
UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1<br />
RX packets:1574 errors:1 dropped:0 overruns:0 frame:0<br />
TX packets:1644 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:3<br />
RX bytes:556116 (543.0 KB)  TX bytes:179325 (175.1 KB)</strong></p>
<p>lo        Link encap:Local Loopback<br />
inet addr:127.0.0.1  Mask:255.0.0.0<br />
&#8230;<br />
&#8230;..</p>
<p>root@arun:~#</p>
<p>root@arun:~# <strong>route</strong><br />
Kernel IP routing table<br />
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface<br />
173.B.C.D       *               255.255.255.255 UH    0      0        0 ppp0<br />
<strong>default         *               0.0.0.0         U     0      0        0 ppp0</strong><br />
root@arun:~#</p>
<p><strong>** Check pppd daemon and how to start/stop/status the connection ?</strong></p>
<p>root@arun:~#<strong> /etc/init.d/tataindicom  </strong><br />
Usage: /etc/init.d/tataindicom {start|stop|status}<br />
root@arun:~#</p>
<p>root@arun:~# <strong>/etc/init.d/tataindicom   start</strong><br />
Starting the TATA Indicom datacard service..<br />
log file is /var/log/tataindicom.log<br />
&#8230;<br />
Done.<br />
root@arun:~#</p>
<p>root@arun:~# /etc/init.d/tataindicom   status<br />
TATA Indicom datacard -<br />
Dailer :: 7144    /usr/bin/wvdial<br />
pppd daemon :: 7152   /usr/sbin/pppd  9600 modem crtscts defaultroute usehostname -detach user internet noipdefault call wvdial usepeerdns idle 0 logfd 6<br />
root@arun:~#</p>
<p>root@arun:~# <strong>/etc/init.d/tataindicom  stop</strong><br />
killing pppd daemon and dailer&#8230;<br />
&#8230;<br />
Done.<br />
root@arun:~#</p>
<p><strong>command(1)</strong> <strong>pppd  - point to point daemon </strong></p>
<p>Frequently used options -<br />
ttyname<br />
Use the serial port called ttyname to communicate with the peer.  If ttyname does not begin  with  a  slash  (/),  the  string  &#8220;/dev/&#8221;  is<br />
prepended  to  ttyname to form the name of the device to open.  If no device name is given, or if the name of the terminal connected to the<br />
standard input is given, pppd will use that terminal, and will not fork to put itself in the background.</p>
<p>speed  An  option  that  is  a  decimal number is taken as the desired baud rate for the serial device.</p>
<p>crtscts<br />
Specifies that pppd should set the serial port to use hardware flow control using the RTS and CTS signals in the RS-232 interface.  If nei‐<br />
ther  the  crtscts,  the nocrtscts, the cdtrcts nor the nocdtrcts option is given, the hardware flow control setting for the serial port is<br />
left unchanged.  Some serial ports (such as Macintosh serial ports) lack a true RTS output. Such serial ports use this  mode  to  implement<br />
unidirectional  flow control. The serial port will suspend transmission when requested by the modem (via CTS) but will be unable to request<br />
the modem to stop sending to the computer. This mode retains the ability to use DTR as a modem control line.</p>
<p>defaultroute<br />
Add a default route to the system routing tables, using the peer as the gateway, when IPCP negotiation  is  successfully  completed.   This<br />
entry is removed when the PPP connection is broken.  This option is privileged if the nodefaultroute option has been specified.</p>
<p>usehostname<br />
Enforce  the  use  of the hostname (with domain name appended, if given) as the name of the local system for authentication purposes (over‐<br />
rides the name option).</p>
<p>call name<br />
Read additional options from the file /etc/ppp/peers/name.  This file may contain privileged options, such as noauth, even if pppd  is  not<br />
being  run  by  root.   The  name  string  may  not  begin with / or include .. as a pathname component</p>
<p>noipdefault<br />
Disables the default behaviour when no local IP address is specified, which is to determine (if possible) the local  IP  address  from  the<br />
hostname.   With  this option, the peer will have to supply the local IP address during IPCP negotiation (unless it specified explicitly on<br />
the command line or in an options file).</p>
<p>nodetach<br />
Don’t detach from the controlling terminal.  Without this option, if a serial device other than the terminal on the standard input is spec‐<br />
ified, pppd will fork to become a background process.</p>
<p>usepeerdns<br />
Ask the peer for up to 2 DNS server addresses.  The addresses supplied by the peer (if any) are passed to the /etc/ppp/ip-up script in  the<br />
environment  variables  DNS1  and  DNS2,  and  the  environment  variable  USEPEERDNS  will  be set to 1.  In addition, pppd will create an<br />
/etc/ppp/resolv.conf file containing one or two nameserver lines with the address(es) supplied by the peer.</p>
<p>user USERNAME<br />
Sets the name used for authenticating the local system to the peer to name.</p>
<p>idle N Specifies that pppd should disconnect if the link is idle for N seconds.  The link is idle when no data packets (i.e. IP packets) are being<br />
sent or received.  Note: it is not advisable to use this option with the persist option without the demand option.</p>
<p>logfd N<br />
Send log messages to file descriptor N.  Pppd will send log messages to at most one file or file descriptor (as well  as  sending  the  log<br />
messages  to syslog), so this option and the logfile option are mutually exclusive.  The default is for pppd to send log messages to stdout<br />
(file descriptor 1), unless the serial port is already open on stdout.</p>
<p>root@arun:~# <strong>cat  /etc/ppp/peers/wvdial</strong><br />
noauth<br />
name wvdial<br />
usepeerdns<br />
root@arun:~#</p>
<p><strong>** Want to see the code  of &#8220;/etc/init.d/tataindicom&#8221; ?</strong></p>
<p>root@arun:~# <strong>cat /etc/init.d/tataindicom </strong><br />
#!/bin/bash</p>
<p>case &#8220;$1&#8243; in</p>
<p>start)<br />
echo &#8220;Starting the TATA Indicom datacard service..&#8221;<br />
/usr/bin/wvdial &gt; /var/log/tataindicom.log 2&gt;&amp;1  &amp;<br />
echo &#8220;log file is /var/log/tataindicom.log&#8221;<br />
echo &#8220;&#8230;&#8221;<br />
echo &#8220;Done.&#8221;<br />
;;</p>
<p>stop)<br />
echo &#8220;killing pppd daemon and dailer&#8230;&#8221;<br />
kill -9 $(ps auxwww  |  grep &#8220;$(which wvdial)&#8221;  | grep -v grep | awk  &#8216;{print $2}&#8217;)<br />
kill -9 $(ps auxwww  |  grep &#8220;$(which pppd)&#8221;  | grep -v grep | awk  &#8216;{print $2}&#8217;)<br />
echo &#8220;&#8230;&#8221;<br />
echo &#8220;Done.&#8221;<br />
;;<br />
status)<br />
echo &#8220;TATA Indicom datacard -&#8221;<br />
pid_of_dailer=$( ps auxwww  |  grep &#8220;$(which wvdial)&#8221;  | grep -v grep | awk  &#8216;{print $2}&#8217;)<br />
pid_of_pppd=$(ps auxwww  |  grep &#8220;$(which pppd)&#8221;  | grep -v grep | awk  &#8216;{print $2}&#8217;)<br />
pppd_details=&#8221;$(ps auxwww | grep &#8220;$(which pppd)&#8221; | grep -v grep   | awk -F&#8217;pppd&#8217;  &#8216;{print $2}&#8217;)&#8221;<br />
echo -e &#8220;Dailer :: $pid_of_dailer    $(which wvdial)&#8221;<br />
echo -e &#8220;pppd daemon :: $pid_of_pppd   $(which pppd) $pppd_details&#8221;<br />
;;<br />
*)<br />
echo &#8220;Usage: /etc/init.d/tataindicom {start|stop|status}&#8221;<br />
exit 1<br />
esac<br />
exit 0<br />
root@arun:~#</p>
<p>Thank you,<br />
Arun Bagul</p>
]]></content:encoded>
			<wfw:commentRss>http://www.indiangnu.org/2008/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
