[Beowulf] stace_analyzer.pl can't work.

Jeff Layton laytonjb at att.net
Tue Sep 16 03:47:29 PDT 2008


As Mark alluded to, I'm not a Perl person at all :)  In fact I used this analyzer as a way to learn some Perl syntax. So I'm looking for advice on how to make it better. Personally I thought about using Python since I know that much better but I wanted to experiment with Perl.

I'm keeping some information around in arrays for the next stage of development - I just haven't gotten there yet. I'm working on a couple of new things - creating a histogram of the IO pattern and creating an IO simulator of the strace file. But, it's probably a good idea to go back and fix these bugs.

I'm traveling and won't be able to get to my desktop until this weekend. Then I will see what I can do. Until then, if anyone has any suggestions, go for it. It if works, let me have a patch or tell me what to fix. Also, if anyone has any suggestions on better ways of storing data rather than the current method (arrays) - I'm all ears. Any thoughts on periodically dumping the arrays to a file or even just dumping the data to files as it parses? Might be slow, but it shouldn't then choke on large files. Could be a command line switch.

Mark - again thanks for jumping in for me. I really appreciate it.

Jeff




----- Original Message ----
From: Mark Hahn <hahn at mcmaster.ca>
To: Eric.L <eric.l.2046 at gmail.com>
Cc: beowulf at beowulf.org
Sent: Tuesday, September 16, 2008 12:13:53 AM
Subject: Re: [Beowulf] stace_analyzer.pl can't work.

>    It throws an error likes:Argument "" isn't numeric in addition (+) at
> ./strace_analyzer.pl line 310, <> line 409105.
>    Have you experienced this? and resolved?

I think the parser could be improved.  in this case, it seems to be 
choking on lines like:
23:34:13.502857 read(7, 0xbfffc670, 32) = -1 EAGAIN (Resource temporarily unavailable)

on 310, junk="unavailable" - the code should handle -1 specially,
since it shouldn't be accumulated to $ReadBytesTotal.

> BTW:I've install the perl module strict and Getopt::long, and the tool
> exhausts my laptop's memory(1.2G) while running.

I guess the code isn't intended to profile >409105-line traces on a laptop ;) 
it's a WIP, and stores a lot of stuff that it doesn't currently use, and
could probably be stored more compactly...

regards, mark hahn.
_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20080916/ec771363/attachment.html>


More information about the Beowulf mailing list