<div dir="ltr"><br><div class="gmail_quote">2008/9/16 Joe Landman <span dir="ltr"><<a href="mailto:landman@scalableinformatics.com">landman@scalableinformatics.com</a>></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've never used Mercurial or any other "real" 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.  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'm a bit worried that this will get out of hand. It's a simple tool to do a quick analysis (although I have bigger plans in mind). I haven'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.  Nothing even remotely complex about it. Slowly (and surely) many projects that have been using bdb (or more correctly *db) are migrating to it.  We have been using it for a while for lots of little things.  Works quite well, painless to set up (you don'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>
        ...  if ($junk < 0);<br>
</blockquote><div><br>I applyed that but got the error:<br>Argument "" isn't numeric in numeric lt (<) at ./strace_analyzer.pl line 310, <> line 64377.<br><br>So I modifiy the line:310 as following:<br>

<br>$ReadBytesTotal += $junk if ($junk ne "" && $junk < 0); <br><br>It works but there is a question:<br>Is it normal that $junk 's value is ""? <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 <<a href="mailto:landman@scalableinformatics.com" target="_blank">landman@scalableinformatics.com</a>><br>
To: Jeff Layton <<a href="mailto:laytonjb@att.net" target="_blank">laytonjb@att.net</a>><br>
Cc: Mark Hahn <<a href="mailto:hahn@mcmaster.ca" target="_blank">hahn@mcmaster.ca</a>>; Eric.L <<a href="mailto:eric.l.2046@gmail.com" target="_blank">eric.l.2046@gmail.com</a>>; <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't work.<br>
<br>
A quick patchy-patchy for 310<br>
<br>
<br>
<br></div>
--- strace_analyzer.pl <<a href="http://strace_analyzer.pl" target="_blank">http://strace_analyzer.pl</a>>    2008-09-16 07:57:34.000000000 -0400<br>
+++ strace_analyzer_new.pl <<a href="http://strace_analyzer_new.pl" target="_blank">http://strace_analyzer_new.pl</a>>    2008-09-16 08:01:45.000000000 -0400<div><div></div><div class="Wj3C7c"><br>
@@ -307,7 +307,7 @@<br>
            $junk =~ s/[^0-9]//g;<br>
<br>
            # Keep track of total number bytes read<br>
-          $ReadBytesTotal += $junk;<br>
+          $ReadBytesTotal += $junk if ($junk != -1);<br>
<br>
            # Clean up write unit<br>
            ($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 "(if $junk < 0)" rather than the above.<br>
<br>
As for the rest of the code structure, writing this parser isn'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.  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.  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.  This happens.  Many "common" techniques fail<br>
when data gets very large (compared to something like ram).  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.  The common solution was to pull everything in to ram and<br>
massage it from there.  This failed rather quickly.<br>
<br>
I don't personally have large amounts of "free" time, but I could likely<br>
help out a bit with this.  Jeff, do you want me to create something on<br>
our mercurial server for this?  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> <mailto:<a href="mailto:landman@scalableinformatics.com" target="_blank">landman@scalableinformatics.com</a>><div class="Ih2E3d">
<br>
web  : <a href="http://www.scalableinformatics.com" target="_blank">http://www.scalableinformatics.com</a><br>
        <a href="http://jackrabbit.scalableinformatics.com" target="_blank">http://jackrabbit.scalableinformatics.com</a><br>
phone: +1 734 786 8423 x121<br>
fax  : +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  : <a href="http://www.scalableinformatics.com" target="_blank">http://www.scalableinformatics.com</a><br>
       <a href="http://jackrabbit.scalableinformatics.com" target="_blank">http://jackrabbit.scalableinformatics.com</a><br>
phone: +1 734 786 8423 x121<br>
fax  : +1 866 888 3112<br>
cell : +1 734 612 4615<br>
</div></div></blockquote></div>
</div>