[ TechnoCage | Caskey | FAH ]

Folding at Home

Where are you at

The following perl junk will take your unitinfo.txt file and give you a projection of when it will finish. Especially useful for NFS mounted clusters where each folding instance runs in a subdir of one directory.

you@host:~/fah$ cat  */unitinfo.txt | perl  -MDate::Parse -e 'while(<>){chomp; if (m/Download time:\s+(.*)/) { \
   $start = str2time($1); } elsif (m/Progress: (\d+)/) { \
   $prog = $1; if($prog > 0) {  $time = time() - $start; \
   $remaining = (int(($time/$prog * (100-$prog))/360))/10; \
   $time = (int($time/360))/10; $rpt = "${prog}% (+${time}h/-${remaining}h)"; \
   push @rpts, $rpt; if(!$lR || $remaining < $lR) { \
   $lR = $remaining; $lrpt = $rpt;}; }} } foreach(@rpts) {print "$_\n";} \
   print "Next WU in: $lrpt\n";'

And this is what the output looks like:

68% (+0.5h/-0.8h)
14% (+12.9h/-92.6h)
12% (+0.8h/-6.7h)
12% (+0.6h/-5.7h)
14% (+12.9h/-92.4h)
14% (+12.9h/-92.5h)
14% (+12.9h/-92.5h)
12% (+0.6h/-5.6h)
12% (+0.5h/-4.3h)
12% (+0.5h/-4.3h)
32% (+13.2h/-41.2h)
12% (+0.6h/-5.7h)
12% (+11.6h/-97.3h)
12% (+0.6h/-5.7h)
12% (+0.7h/-6h)
12% (+0.7h/-6.2h)
32% (+13.1h/-40.9h)
Next WU in: 68% (+0.5h/-0.8h)

Comments welcome.

Last updated: 2005-01-17