[Swift-devel] Formatting kickstart records
Ian Foster
foster at mcs.anl.gov
Mon Sep 10 11:12:18 CDT 2007
is this format in the "standard log format" that CEDPS defined? I would
think it should be.
Michael Wilde wrote:
> I started a small perl script to format kickstart records.
>
> For now, for each kickstart output file on the cmd line it prints
> one-liners of the form:
>
> Start=2007-09-09T00:24:43.161-05:00 duration=83.993 user=82.470
> sys=1.360 machine=i686 host=tg-v050.uc.teragrid.org
>
> but its pretty generalizable.
>
> I did this to find the min, max and stats on run times, looking for
> outliers that are holding up the workflow.
>
> If anyone has a similar/better tool please point it out, otherwise
> I'll continue to enhance this. Suggestions for a better approach are
> welcome.
>
> Pavel (summer student) did something like this in C a while back; I
> thought that was added to vds/contrib at that time but I dont see it
> in the latest VDS release. Need to hunt it down.
>
> This perl script is very simple and easy, but rather slow on 1000
> kickstart records (need to get timings; Im sure it can be improved,
> possibly by grabbing multiple fields on each XPath call.
>
> - Mike
>
> $ cat ~/vds/kix
> #!/usr/bin/perl -w -I/home/wilde/vds
> # ^^^ How to best set the module path?
>
> # Print fields from a list of invocation record xml files
>
> use strict;
> use XML::XPath;
> use XML::XPath::XMLParser;
>
> while(@ARGV) {
> print_irec(shift @ARGV);
> }
>
> sub print_irec
> {
> my $irec = shift;
> my $xp = XML::XPath->new(filename => $irec);
>
> my $start = $xp->findvalue('/invocation/mainjob/@start');
> my $utime = $xp->findvalue('/invocation/mainjob/usage/@utime');
> my $stime = $xp->findvalue('/invocation/mainjob/usage/@stime');
> my $duration = $xp->findvalue('/invocation/mainjob/@duration');
> my $machine = $xp->findvalue('/invocation/uname/@machine');
> my $host = $xp->findvalue('/invocation/@hostname');
>
> print "Start=$start duration=$duration user=$utime sys=$stime
> machine=$machine host=$host\n";
> }
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
--
Ian Foster, Director, Computation Institute
Argonne National Laboratory & University of Chicago
Argonne: MCS/221, 9700 S. Cass Ave, Argonne, IL 60439
Chicago: Rm 405, 5640 S. Ellis Ave, Chicago, IL 60637
Tel: +1 630 252 4619. Web: www.ci.uchicago.edu.
Globus Alliance: www.globus.org.
More information about the Swift-devel
mailing list