<?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>Linux, Programming, Bash &#38; my thoughts...</title>
	<atom:link href="http://mahaveerdarade.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mahaveerdarade.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 19 Jan 2012 09:49:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mahaveerdarade.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Linux, Programming, Bash &#38; my thoughts...</title>
		<link>http://mahaveerdarade.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mahaveerdarade.wordpress.com/osd.xml" title="Linux, Programming, Bash &#38; my thoughts..." />
	<atom:link rel='hub' href='http://mahaveerdarade.wordpress.com/?pushpress=hub'/>
		<item>
		<title>systemtap script linux scsi timeout</title>
		<link>http://mahaveerdarade.wordpress.com/2012/01/19/systemtap-script-linux-scsi-timeout/</link>
		<comments>http://mahaveerdarade.wordpress.com/2012/01/19/systemtap-script-linux-scsi-timeout/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 09:44:58 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=94</guid>
		<description><![CDATA[1 #!/usr/bin/stap 2 3 probe begin{ 4         print(&#8220;Starting probe, watching for SG_IO with threshold greater than &#8220;); 5             print($1 / 1000); 6                 print(&#8221; seconds.\nType control-c to stop.\n&#8221;); 7 } 8 9 probe kernel.function(&#8220;sg_io&#8221;) 10 { 11         if ($hdr-&#62;timeout &#62; $1) { 12                    printf(&#8220;%s(%d) called sg_io with timeout = %d, greater than threshold\n&#8221;, 13                                         execname(), pid(), [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=94&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1 #!/usr/bin/stap<br />
2<br />
3 probe begin{<br />
4         print(&#8220;Starting probe, watching for SG_IO with threshold greater than &#8220;);<br />
5             print($1 / 1000);<br />
6                 print(&#8221; seconds.\nType control-c to stop.\n&#8221;);<br />
7 }<br />
8<br />
9 probe kernel.function(&#8220;sg_io&#8221;)<br />
10 {<br />
11         if ($hdr-&gt;timeout &gt; $1) {<br />
12                    printf(&#8220;%s(%d) called sg_io with timeout = %d, greater than threshold\n&#8221;,<br />
13                                         execname(), pid(), $hdr-&gt;timeout);<br />
14         }<br />
15         if ($q-&gt;sg_timeout &gt; $1){<br />
16                     printf(&#8220;%s(%d) called sg_io with sg_timeout = %d, greater than threshold\n&#8221;,<br />
17                     execname(), pid(), $q-&gt;sg_timeout);<br />
18         }<br />
19 }<br />
20<br />
21 probe end {<br />
22         print(&#8220;End probe\n&#8221;);<br />
23 }</p>
<p>&nbsp;</p>
<pre><a id="L281" name="linux+v2.6.32/block/scsi_ioctl.c#L281" href="http://lxr.linux.no/linux+*/block/scsi_ioctl.c#L281"></a> 281static int <a href="http://lxr.linux.no/linux+*/+code=sg_io">sg_io</a>(struct <a href="http://lxr.linux.no/linux+*/+code=request_queue">request_queue</a> *<a href="http://lxr.linux.no/linux+*/+code=q">q</a>, struct <a href="http://lxr.linux.no/linux+*/+code=gendisk">gendisk</a> *<a href="http://lxr.linux.no/linux+*/+code=bd_disk">bd_disk</a>,
<a id="L282" name="L282" href="http://lxr.linux.no/linux+*/block/scsi_ioctl.c#L282"></a> 282                struct <a href="http://lxr.linux.no/linux+*/+code=sg_io_hdr">sg_io_hdr</a> *<a href="http://lxr.linux.no/linux+*/+code=hdr">hdr</a>, <a href="http://lxr.linux.no/linux+*/+code=fmode_t">fmode_t</a> <a href="http://lxr.linux.no/linux+*/+code=mode">mode</a>)
<a id="L283" name="L283" href="http://lxr.linux.no/linux+*/block/scsi_ioctl.c#L283"></a> 283{
<a id="L284" name="L284" href="http://lxr.linux.no/linux+*/block/scsi_ioctl.c#L284"></a> 284        unsigned long <a href="http://lxr.linux.no/linux+*/+code=start_time">start_time</a>;</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=94&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2012/01/19/systemtap-script-linux-scsi-timeout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>memory map glibc pmap PROT_NONE</title>
		<link>http://mahaveerdarade.wordpress.com/2012/01/18/memory-map-glibc-pmap-prot_none/</link>
		<comments>http://mahaveerdarade.wordpress.com/2012/01/18/memory-map-glibc-pmap-prot_none/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 12:58:30 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[glibc PROT_NONE pmap]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/2012/01/18/memory-map-glibc-pmap-prot_none/</guid>
		<description><![CDATA[02:18 PM) mdarade: cld u tell me use cases of PROT_NONE except buffer overflow? (06:02:43 PM) mdarade: &#38; what decides size of areas protected with PROT_NONE? (06:03:05 PM) mdarade: I mean i see upto 64K area being marked as PROT_NONE(06:06:02 PM) siddhesh: PROT_NONE is basically just no permissions (06:06:06 PM) siddhesh: use it as you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=93&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span><span style="color:#204a87;">02:18 PM) </span></span>mdarade: cld u tell me use cases of PROT_NONE except buffer overflow? <br /><span><span style="color:#204a87;">(06:02:43 PM) </span></span>mdarade: &amp; what decides size of areas protected with PROT_NONE? <br /> <span><span style="color:#204a87;">(06:03:05 PM) </span></span>mdarade: I mean i see upto 64K area being marked as PROT_NONE<br /><span><span style="color:#cc0000;">(06:06:02 PM) </span></span>siddhesh: PROT_NONE is basically just no permissions<br /> <span><span style="color:#cc0000;">(06:06:06 PM) </span></span>siddhesh: use it as you will<br /><span><span style="color:#cc0000;">(06:06:29 PM) </span></span>siddhesh: typically they&#8217;re used to mark guard pages to catch buffr overflows<br /> <span><span style="color:#cc0000;">(06:07:02 PM) </span></span>siddhesh: but it&#8217;s generally a good idea to mark pages as PTOR_NONE if they&#8217;re not intended to be used<br /> <span><span style="color:#cc0000;">(06:07:11 PM) </span></span>siddhesh: libc uses it for its arena allocations<br /><span><span style="color:#204a87;">(06:08:34 PM) </span></span>mdarade: size of areas protected with PROT_NONE is fixed? <br /> <span><span style="color:#cc0000;">(06:08:56 PM) </span></span>siddhesh: whatever size you want, rounded to page size of course<br /><span><span style="color:#204a87;">(06:09:09 PM) </span></span>mdarade: what is use in having 64k area protected with it? <br /> <span><span style="color:#cc0000;">(06:09:24 PM) </span></span>siddhesh: depends on where it is used<br /><span><span style="color:#cc0000;">(06:09:27 PM) </span></span>siddhesh: where is it used?<br /> <span><span style="color:#204a87;">(06:10:05 PM) </span></span>mdarade: i see 132k anon allocation <br /><span><span style="color:#204a87;">(06:10:09 PM) </span></span>mdarade: now to guard it <br /> <span><span style="color:#204a87;">(06:10:24 PM) </span></span>mdarade: why prot_none area size have to be 64? <br /><span><span style="color:#cc0000;">(06:10:48 PM) </span></span>siddhesh: where? which code?<br /> <span><span style="color:#204a87;">(06:10:50 PM) </span></span>mdarade: 64400k?<br /><span><span style="color:#204a87;">(06:11:08 PM) </span></span>mdarade: pmap of java <br /> <span><span style="color:#cc0000;">(06:11:24 PM) </span></span>siddhesh: ok, is it multithreaded?<br /><span><span style="color:#204a87;">(06:11:43 PM) </span></span>mdarade: yeap<br /> <span><span style="color:#cc0000;">(06:12:13 PM) </span></span>siddhesh: then those must be arenas allocated by libc for each thread<br /> <span><span style="color:#cc0000;">(06:12:21 PM) </span></span>siddhesh: arenas act as heaps for each thread<br /><span><span style="color:#cc0000;">(06:12:26 PM) </span></span>siddhesh: to reduce locking between them<br /> <span><span style="color:#cc0000;">(06:12:54 PM) </span></span>siddhesh: a new arena is always allocated with PROT_NONE and then parts of it given access as and when needed<br /> <span><span style="color:#cc0000;">(06:13:03 PM) </span></span>siddhesh: for malloc requests<br /><span><span style="color:#204a87;">(06:13:07 PM) </span></span>mdarade: got it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  thanks</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=93&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2012/01/18/memory-map-glibc-pmap-prot_none/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>Fraud happened in Magarpatta City, Hadapsar, Pune</title>
		<link>http://mahaveerdarade.wordpress.com/2011/12/15/fraud-happened-in-magarpatta-city-hadapsar-pune/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/12/15/fraud-happened-in-magarpatta-city-hadapsar-pune/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 16:29:18 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[pune magarpatta hadapasar fraud money rent deposit]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=87</guid>
		<description><![CDATA[This blog post is for those lucky ones who prefer to dig a little deeper before investing even a rupee. I want to share a story (which accidentally happened with me) while I was staying at A-35, Erica, Magarpatta city. When my employer provided accommodation was about to get over and I was looking out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=87&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog post is for those lucky ones who prefer to dig a little deeper before investing even a rupee. I want to share a story (which accidentally happened with me) while I was staying at A-35, Erica, Magarpatta city. When my employer provided accommodation was about to get over and I was looking out for some place I was contacted real estate agent/broker named Shahaji Somavanshi. He was a middleman whose job was to rent out someone else&#8217;s (actual owner) bungalow as he was working part time as a cab driver. Looking at him I realized I cannot trust this guy (thanks to my analytical skills) so I decided not to give deposit amount more than five thousand.</p>
<p>Finally I successfully negotiated the deal and stayed there for only two months. Even though serving one months notice he failed to return deposit back at the time of leaving. I contacted him after two weeks and again he promised some random date. This went happening until one day when I find out that he blocked my number. Finally I realized that it doesn&#8217;t make sense to contact this guy and its time to file a police complaint. Police managed to take money from that guy and I got my money back. Well not all of it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  but yes the process was all hectic, waste of energy and time.</p>
<p>Do remember name of those frauds.</p>
<p>Shahaji Somvanshi.</p>
<p>Santosh Kambale.</p>
<p>This post is my first contribution to society  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=87&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/12/15/fraud-happened-in-magarpatta-city-hadapsar-pune/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>rsyslog patch</title>
		<link>http://mahaveerdarade.wordpress.com/2011/12/15/rsyslog-patch/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/12/15/rsyslog-patch/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 10:05:43 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[patch rsyslog]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=83</guid>
		<description><![CDATA[--- a/tools/syslogd.c 2011-12-14 14:38:53.557984324 +0530 +++ b/tools/syslogd.c 2011-12-14 14:38:45.011984782 +0530 @@ -3177,6 +3177,7 @@ uchar *LocalHostName; uchar *LocalDomain; uchar *LocalFQDNName; + int i; /* first, parse the command line options. We do not carry out any actual work, just * see what we should do. This relieves us from certain anomalies and we can process [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=83&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>--- a/tools/syslogd.c	2011-12-14 14:38:53.557984324 +0530
+++ b/tools/syslogd.c	2011-12-14 14:38:45.011984782 +0530
@@ -3177,6 +3177,7 @@
 	uchar *LocalHostName;
 	uchar *LocalDomain;
 	uchar *LocalFQDNName;
+	int i;

 	/* first, parse the command line options. We do not carry out any actual work, just
 	 * see what we should do. This relieves us from certain anomalies and we can process
@@ -3316,9 +3317,22 @@
 		 */
 		hent = gethostbyname((char*)LocalHostName);
 		if(hent) {
+			if(hent-&gt;h_aliases) {
+				for (i=0; hent-&gt;h_aliases[i]; i++) {
+					if(strstr((hent-&gt;h_aliases[i]), (char*)LocalHostName)) {
+						//found hostname matching in aliases. use currently found one and break loop
+						 break;
+					}
+				}
+			}
+
 			free(LocalHostName);
-			CHKmalloc(LocalHostName = (uchar*)strdup(hent-&gt;h_name));
-
+			if(hent-&gt;h_aliases[i]) {
+				CHKmalloc(LocalHostName = (uchar*)strdup(hent-&gt;h_aliases[i]));
+			} else {
+				CHKmalloc(LocalHostName = (uchar*)strdup(hent-&gt;h_name));
+			}
+
 			if((p = (uchar*)strchr((char*)LocalHostName, '.')))
 			{
 				*p++ = '';</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=83&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/12/15/rsyslog-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>systemtap script</title>
		<link>http://mahaveerdarade.wordpress.com/2011/12/15/systemtap-script/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/12/15/systemtap-script/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 10:02:17 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kernel linux probe debugging]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/2011/12/15/systemtap-script/</guid>
		<description><![CDATA[probe begin {     printf(&#8220;probe started&#8221;); } probe end {     printf(&#8220;probe finished&#8221;); } probe kernel.function(&#8220;radix_tree_insert&#8221;).return {     if ($return) {         printf(&#8220;%s: comm %s, pid %d, retval %d\n&#8221;, probefunc(), execname(), pid(), $return);         print_backtrace();     } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=80&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>probe begin { <br />    printf(&#8220;probe started&#8221;); <br />} </p>
<p>probe end { <br />    printf(&#8220;probe finished&#8221;); <br />} </p>
<p>probe kernel.function(&#8220;radix_tree_insert&#8221;).return { <br />    if ($return) { <br />        printf(&#8220;%s: comm %s, pid %d, retval %d\n&#8221;, probefunc(), execname(), pid(), $return); <br />        print_backtrace(); <br />    } <br />}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=80&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/12/15/systemtap-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>bit play with signed unsigned</title>
		<link>http://mahaveerdarade.wordpress.com/2011/12/08/bit-play-with-signed-unsigned/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/12/08/bit-play-with-signed-unsigned/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 09:47:05 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=76</guid>
		<description><![CDATA[[root@dhcp209-92 /]# cat size_t_size.c #include &#60;stdio.h&#62; #include &#60;stdlib.h&#62; int main() { size_t len = -1; /*    ssize_t chk = -1; size_t toprint; printf(&#8220;size of size_t is %d&#8221;, sizeof(size_t)); printf(&#8220;size of ssize_t is %d&#8221;, sizeof(ssize_t)); printf(&#8220;len is %d&#8221;, len); toprint = (int) len; printf(&#8220;toprint is %d&#8221;, toprint); */ if( len &#60;= 0 &#124;&#124; len == -1) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=76&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[root@dhcp209-92 /]# cat size_t_size.c<br />
#include &lt;stdio.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
int main() {<br />
size_t len = -1;<br />
/*    ssize_t chk = -1;<br />
size_t toprint;<br />
printf(&#8220;size of size_t is %d&#8221;, sizeof(size_t));<br />
printf(&#8220;size of ssize_t is %d&#8221;, sizeof(ssize_t));<br />
printf(&#8220;len is %d&#8221;, len);<br />
toprint = (int) len;<br />
printf(&#8220;toprint is %d&#8221;, toprint);<br />
*/<br />
if( len &lt;= 0 || len == -1)<br />
printf(&#8221; -1 if cond worked&#8221;);<br />
//    if ( len == chk )<br />
//        printf(&#8221; -1 cond worked&#8221;);<br />
return 0;<br />
}<br />
[root@dhcp209-92 /]#</p>
<p>I don&#8217;t prefer to post output for different conditions as I want readers to try it out so that they understand it better <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=76&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/12/08/bit-play-with-signed-unsigned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>C snippet showing conditional function prototype</title>
		<link>http://mahaveerdarade.wordpress.com/2011/11/04/c-sinppet-showing-conditional-function-prototype/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/11/04/c-sinppet-showing-conditional-function-prototype/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 11:40:21 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=70</guid>
		<description><![CDATA[1441         send_file_entry(f, fbuf, file, 1442 #ifdef SUPPORT_LINKS 1443                 symlink_name, symlink_len, 1444 #endif 1445                 flist-&#62;used, flist-&#62;ndx_start); 389 static void send_file_entry(int f, const char *fname, struct file_struct *file, 390 #ifdef SUPPORT_LINKS 391                 const char *symlink_name, int symlink_len, 392 #endif 393                 int ndx, int first_ndx)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=70&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1441         send_file_entry(f, fbuf, file,<br />
1442 #ifdef SUPPORT_LINKS<br />
1443                 symlink_name, symlink_len,<br />
1444 #endif<br />
1445                 flist-&gt;used, flist-&gt;ndx_start);</p>
<p>389 static void send_file_entry(int f, const char *fname, struct file_struct *file,<br />
390 #ifdef SUPPORT_LINKS<br />
391                 const char *symlink_name, int symlink_len,<br />
392 #endif<br />
393                 int ndx, int first_ndx)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=70&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/11/04/c-sinppet-showing-conditional-function-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>signals linux ipc</title>
		<link>http://mahaveerdarade.wordpress.com/2011/08/19/68/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/08/19/68/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 09:26:31 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=68</guid>
		<description><![CDATA[0x00000fff922453cc in do_sigsuspend (set=0xfffc72dc668) at ../sysdeps/unix/sysv/linux/sigsuspend.c:63 63 return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); If pattern &#60;signal handler called&#62; is not present around above bt snippet then signal didn't occur and process which have called sigsuspend has terminated abnormally.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=68&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>0x00000fff922453cc in do_sigsuspend (set=0xfffc72dc668) at ../sysdeps/unix/sysv/linux/sigsuspend.c:63
63        return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8);

If pattern

&lt;signal handler called&gt;

is not present around above bt snippet then signal didn't occur and process which have
called sigsuspend has terminated abnormally.</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=68&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/08/19/68/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use syslog for logging messages</title>
		<link>http://mahaveerdarade.wordpress.com/2011/08/08/how-to-use-syslog-for-logging-messages/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/08/08/how-to-use-syslog-for-logging-messages/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 12:18:22 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=65</guid>
		<description><![CDATA[[root@mdarade sample_code]# cat syslog_md.c #include &#60;stdio.h&#62; #include &#60;syslog.h&#62; #include &#60;unistd.h&#62; int main() { char hello[]=&#8221;mahaveer darade&#8221;; openlog(&#8220;syslog_md&#8221;, LOG_PID, LOG_DAEMON ); syslog(LOG_INFO, &#8220;%s\n&#8221;, hello); printf(&#8220;pid is %d\n&#8221;, getpid()); closelog(); return 0; } [root@mdarade sample_code]# [root@mdarade sample_code]# tail -f /var/log/messages Aug  8 17:43:14 mdarade syslog_md[4144]: mahaveer darade Config files: /etc/syslog.conf, /etc/sysonfig/syslog<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=65&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<dl>
<dt><strong>[root@mdarade sample_code]# cat syslog_md.c<br />
#include &lt;stdio.h&gt;<br />
#include &lt;syslog.h&gt;<br />
#include &lt;unistd.h&gt;<br />
int main() {<br />
char hello[]=&#8221;mahaveer darade&#8221;;<br />
openlog(&#8220;syslog_md&#8221;, LOG_PID, LOG_DAEMON );<br />
syslog(LOG_INFO, &#8220;%s\n&#8221;, hello);<br />
printf(&#8220;pid is %d\n&#8221;, getpid());<br />
closelog();<br />
return 0;<br />
}<br />
[root@mdarade sample_code]#<br />
</strong></dt>
<dt>[root@mdarade sample_code]# tail -f /var/log/messages<br />
Aug  8 17:43:14 mdarade syslog_md[4144]: mahaveer darade</dt>
<dt></dt>
<dt>Config files: /etc/syslog.conf, /etc/sysonfig/syslog</p>
</dt>
</dl>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=65&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/08/08/how-to-use-syslog-for-logging-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
		<item>
		<title>script to find files having ge number of lines</title>
		<link>http://mahaveerdarade.wordpress.com/2011/08/04/script-to-find-files-having-ge-number-of-lines/</link>
		<comments>http://mahaveerdarade.wordpress.com/2011/08/04/script-to-find-files-having-ge-number-of-lines/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 12:17:05 +0000</pubDate>
		<dc:creator>Mahaveer Darade</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mahaveerdarade.wordpress.com/?p=62</guid>
		<description><![CDATA[[mdarade@mdarade net-snmp-5.3.2.2]$ cat ~/scripts/find_files_having_specific_number_of_lines.sh #!/usr/bin/env bash find . -type f &#124; while read line do         no_of_lines=`wc -l $line&#124; cut -d" " -f1`;         if [ $no_of_lines -ge $1 ] ; then             ls -l "$line";         fi done [mdarade@mdarade net-snmp-5.3.2.2]$<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=62&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>
[mdarade@mdarade net-snmp-5.3.2.2]$ cat ~/scripts/find_files_having_specific_number_of_lines.sh
#!/usr/bin/env bash
find . -type f | while read line
do
        no_of_lines=`wc -l $line| cut -d" " -f1`;
        if [ $no_of_lines -ge $1 ] ; then
            ls -l "$line";
        fi
done
[mdarade@mdarade net-snmp-5.3.2.2]$ 
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mahaveerdarade.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mahaveerdarade.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mahaveerdarade.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mahaveerdarade.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mahaveerdarade.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mahaveerdarade.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mahaveerdarade.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mahaveerdarade.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mahaveerdarade.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mahaveerdarade.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mahaveerdarade.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mahaveerdarade.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mahaveerdarade.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mahaveerdarade.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mahaveerdarade.wordpress.com&amp;blog=1786624&amp;post=62&amp;subd=mahaveerdarade&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mahaveerdarade.wordpress.com/2011/08/04/script-to-find-files-having-ge-number-of-lines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/5889b767d72b9ae6ee0d64519d8a0c64?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MD</media:title>
		</media:content>
	</item>
	</channel>
</rss>
