..:: MacHacking.net ::.. Article from MacHacking.net Knowledge Base: http://kb.machacking.net ********** Title: Monitor SETI command line client progress Author: colin ********** This is a tutorial from macosxhints.com (If you use this on your site, please do not edit anything, including this information at the top.) *************************************************************************** Monitor SETI command line client progress ÊFri, Mar 14 '03 at 09:27AM ¥ from: colin Ê Thanks to Authoxy, I am finally able to process units for SETI from behind the company firewall. I decided to use the command line client and wanted a way to check the progress of a workunit being processed, so I made this little Perl script which displays '% complete' and 'hours processing' other things could be added if you'd like. #!/usr/bin/perl -w open (INPUT, "< (path to seti state.sah file goes here) "); my @file = ; close(INPUT); chomp(@file); my %hash; foreach $item(@file) { my @array = split("=", $item); $hash{$array[0]} = $array[1]; } $perc = sprintf("%.1f",$hash{prog}*100); $time = sprintf("%.2f",$hash{cpu}/3600); print "\nSETI CLI MONITOR\n----------\n$perc % processed\n $time hours processing\n\n"; That last line is one long line, and make sure you insert the path to the state.sah file in line two of the script! I saved this in my home directory as 'checkseti.pl' chmod'ed it to be executable, and added an alias to it in my /etc/csh.login file so I can run it from anywhere on my system. The output looks like this: 45.7 % processed 6.26 hours processing I hope some of you find this useful. ********** Article from MacHacking.net Knowledge Base: http://kb.machacking.net