<div dir="ltr"><br><div class="gmail_quote">2008/9/16 Joe Landman <span dir="ltr">&lt;<a href="mailto:landman@scalableinformatics.com">landman@scalableinformatics.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Jeff Layton wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I&#39;ve never used Mercurial or any other &quot;real&quot; programming tool for tracking changes, but go for it! It forces me to learn it.<br>
</blockquote>
<br></div>
Common ones these days are Mercurial and git. &nbsp;I prefer the former, it is understandable by mere mortals.<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I like the idea of a DB, but I&#39;m a bit worried that this will get out of hand. It&#39;s a simple tool to do a quick analysis (although I have bigger plans in mind). I haven&#39;t looked at SQLite in a few years. Is it still an in-memory DB or does it allow you to dump the DB to a file (or two).<br>

</blockquote>
<br></div>
On disk very simple database. &nbsp;Nothing even remotely complex about it. Slowly (and surely) many projects that have been using bdb (or more correctly *db) are migrating to it. &nbsp;We have been using it for a while for lots of little things. &nbsp;Works quite well, painless to set up (you don&#39;t).<div class="Ih2E3d">
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
BTW - thanks for the patch. I like the second option of ignoring any return codes that are negative. Easy change.<br>
</blockquote>
<br></div>
should read<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;... &nbsp;if ($junk &lt; 0);<br>
</blockquote><div><br>I applyed that but got the error:<br>Argument &quot;&quot; isn&#39;t numeric in numeric lt (&lt;) at ./strace_analyzer.pl line 310, &lt;&gt; line 64377.<br><br>So I modifiy the line:310 as following:<br>

<br>$ReadBytesTotal += $junk if ($junk ne &quot;&quot; &amp;&amp; $junk &lt; 0); <br><br>It works but there is a question:<br>Is it normal that $junk &#39;s value is &quot;&quot;? <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
<br>
Thanks!<br>
<br>
Jeff<br>
<br>
<br>
----- Original Message ----<br>
From: Joe Landman &lt;<a href="mailto:landman@scalableinformatics.com" target="_blank">landman@scalableinformatics.com</a>&gt;<br>
To: Jeff Layton &lt;<a href="mailto:laytonjb@att.net" target="_blank">laytonjb@att.net</a>&gt;<br>
Cc: Mark Hahn &lt;<a href="mailto:hahn@mcmaster.ca" target="_blank">hahn@mcmaster.ca</a>&gt;; Eric.L &lt;<a href="mailto:eric.l.2046@gmail.com" target="_blank">eric.l.2046@gmail.com</a>&gt;; <a href="mailto:beowulf@beowulf.org" target="_blank">beowulf@beowulf.org</a><br>

Sent: Tuesday, September 16, 2008 8:13:10 AM<br>
Subject: Re: [Beowulf] stace_analyzer.pl can&#39;t work.<br>
<br>
A quick patchy-patchy for 310<br>
<br>
<br>
<br></div>
--- strace_analyzer.pl &lt;<a href="http://strace_analyzer.pl" target="_blank">http://strace_analyzer.pl</a>&gt; &nbsp; &nbsp;2008-09-16 07:57:34.000000000 -0400<br>
+++ strace_analyzer_new.pl &lt;<a href="http://strace_analyzer_new.pl" target="_blank">http://strace_analyzer_new.pl</a>&gt; &nbsp; &nbsp;2008-09-16 08:01:45.000000000 -0400<div><div></div><div class="Wj3C7c"><br>
@@ -307,7 +307,7 @@<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$junk =~ s/[^0-9]//g;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Keep track of total number bytes read<br>
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ReadBytesTotal += $junk;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ReadBytesTotal += $junk if ($junk != -1);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Clean up write unit<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;($junk1, $junk2)=split(/\,/,$cmd_unit);<br>
<br>
<br>
There may be other error return codes which are negative, so if you want<br>
to filter those as well, use &quot;(if $junk &lt; 0)&quot; rather than the above.<br>
<br>
As for the rest of the code structure, writing this parser isn&#39;t all<br>
that hard, and for those with smaller memories but bigger disks (and a<br>
desired to analyze large straces), we could use the DBIx::SimplePerl<br>
module. &nbsp;Jeff is already putting his arrays together as hashes, and that<br>
module makes it real easy to dump a hash data structure directly into a<br>
database, say a SQLite3 database. &nbsp;Which, curiously, could make a bit of<br>
the code easier to deal with/write/debug.<br>
<br>
The issue you have to worry about in dealing with huge streams of data,<br>
is running out of ram. &nbsp;This happens. &nbsp;Many &quot;common&quot; techniques fail<br>
when data gets very large (compared to something like ram). &nbsp;We had to<br>
solve a large upload/download problem for a customer who decided to use<br>
a web server for multi gigabyte file upload/download form in an<br>
application. &nbsp;The common solution was to pull everything in to ram and<br>
massage it from there. &nbsp;This failed rather quickly.<br>
<br>
I don&#39;t personally have large amounts of &quot;free&quot; time, but I could likely<br>
help out a bit with this. &nbsp;Jeff, do you want me to create something on<br>
our mercurial server for this? &nbsp;Or do you have it in SVN/CVS somewhere?<br>
<br>
Joe<br>
<br>
<br>
-- <br>
Joseph Landman, Ph.D<br>
Founder and CEO<br>
Scalable Informatics LLC,<br></div></div>
email: <a href="mailto:landman@scalableinformatics.com" target="_blank">landman@scalableinformatics.com</a> &lt;mailto:<a href="mailto:landman@scalableinformatics.com" target="_blank">landman@scalableinformatics.com</a>&gt;<div class="Ih2E3d">
<br>
web &nbsp;: <a href="http://www.scalableinformatics.com" target="_blank">http://www.scalableinformatics.com</a><br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://jackrabbit.scalableinformatics.com" target="_blank">http://jackrabbit.scalableinformatics.com</a><br>
phone: +1 734 786 8423 x121<br>
fax &nbsp;: +1 866 888 3112<br>
cell : +1 734 612 4615<br>
</div></blockquote><div><div></div><div class="Wj3C7c">
<br>
<br>
-- <br>
Joseph Landman, Ph.D<br>
Founder and CEO<br>
Scalable Informatics LLC,<br>
email: <a href="mailto:landman@scalableinformatics.com" target="_blank">landman@scalableinformatics.com</a><br>
web &nbsp;: <a href="http://www.scalableinformatics.com" target="_blank">http://www.scalableinformatics.com</a><br>
 &nbsp; &nbsp; &nbsp; <a href="http://jackrabbit.scalableinformatics.com" target="_blank">http://jackrabbit.scalableinformatics.com</a><br>
phone: +1 734 786 8423 x121<br>
fax &nbsp;: +1 866 888 3112<br>
cell : +1 734 612 4615<br>
</div></div></blockquote></div>
</div>