From abez at abez.ca Mon Jul 1 16:25:49 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: Next Meeting Message-ID: We probably should discuss when the next meeting is going to be. I vote for some evening next week. -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From Peter at PSDT.com Mon Jul 1 16:29:59 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: Next Meeting In-Reply-To: Message-ID: <4.3.2.7.2.20020701142850.00b3fcb0@shell2.webquarry.com> At 02:25 PM 7/1/02 -0700, abez wrote: >We probably should discuss when the next meeting is going to be. > >I vote for some evening next week. Fine with me. I suggest same place, 7pm. Some people had a conflict with Wednesdays, do I hear any other suggestions? -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From abez at abez.ca Mon Jul 1 16:39:30 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: Next Meeting In-Reply-To: <4.3.2.7.2.20020701142850.00b3fcb0@shell2.webquarry.com> Message-ID: So the days are: 15 16 17 18 19 For me I can only make it 15 16 17 18 Probably people should just mention which ones are free for them. On Mon, 1 Jul 2002, Peter Scott wrote: > At 02:25 PM 7/1/02 -0700, abez wrote: > >We probably should discuss when the next meeting is going to be. > > > >I vote for some evening next week. > > Fine with me. I suggest same place, 7pm. Some people had a conflict > with Wednesdays, do I hear any other suggestions? > > -- > Peter Scott > Pacific Systems Design Technologies > http://www.perldebugged.com/ > -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From pyuson at conceptsolutionsbc.com Tue Jul 2 00:20:07 2002 From: pyuson at conceptsolutionsbc.com (Philip Yuson) Date: Wed Aug 4 00:11:06 2004 Subject: Next Meeting In-Reply-To: References: Message-ID: <0207012220070W.12729@www.conceptsolutionsbc.com> Where is the 'same place'? thanks. On Monday 01 July 2002 14:39, abez wrote: > So the days are: > > 15 16 17 18 19 > > For me I can only make it 15 16 17 18 > > Probably people should just mention which ones are free for them. > > On Mon, 1 Jul 2002, Peter Scott wrote: > > At 02:25 PM 7/1/02 -0700, abez wrote: > > >We probably should discuss when the next meeting is going to be. > > > > > >I vote for some evening next week. > > > > Fine with me. I suggest same place, 7pm. Some people had a conflict > > with Wednesdays, do I hear any other suggestions? > > > > -- > > Peter Scott > > Pacific Systems Design Technologies > > http://www.perldebugged.com/ -- =================================== Philip Yuson Senior Technical Consultant Concept Solutions Corporation (http://www.conceptsolutionsbc.com) Contributing Editor - Perl (http://www.suite101.com/welcome.cfm/perl) Author: . Introduction to Perl . Object Oriented Programming in Perl (http://www.selfhelpguides.com) From nkuipers at uvic.ca Tue Jul 2 02:17:53 2002 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:06 2004 Subject: Meeting time Message-ID: <3D2115A4@wm2.uvic.ca> The 17th at 7 in the library is fine by me. "Luckily, we have computers." From nkuipers at uvic.ca Tue Jul 2 19:56:22 2002 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:06 2004 Subject: Meeting time Message-ID: <3D2256F3@wm2.uvic.ca> >Is the art gallery still hors de combat? Where should we meet? Actually it now sports a collection of paintings consisting of lines of various widths that I could have created in Kindergarten, with the slogan "The Science of Imagination" or something stupid like that. Seriously, it is now impossible to miss assuming you get through the library turnstiles. I am all for meeting there again. "Luckily, we have computers." From abez at abez.ca Fri Jul 12 01:17:53 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: Meeting Message-ID: Ok so last time we talked about this we said 15th 16th or 17th. No one else volunteered anything so I will put together a PERL OOP tutorial/lecture. Can anyone NOT meet on the 17th? Abram -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From nkuipers at uvic.ca Fri Jul 12 02:13:13 2002 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:06 2004 Subject: Meeting Message-ID: <3D2E3C9A@wm2.uvic.ca> >Can anyone NOT meet on the 17th? I was under the impression from Peter that we were meeting on the 16th because the 17th happens to be the third wednesday of the month hence the Web Enthusiasts meeting etc... "I think for my lunch tomorrow I'll make a tuna and pickle triangle bunwich." From Peter at PSDT.com Fri Jul 12 10:40:55 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: Meeting In-Reply-To: <3D2E3C9A@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20020712083949.00ab1e60@shell2.webquarry.com> At 12:13 AM 7/12/02 -0700, nkuipers wrote: > >Can anyone NOT meet on the 17th? > >I was under the impression from Peter that we were meeting on the 16th >because >the 17th happens to be the third wednesday of the month hence the Web >Enthusiasts meeting etc... That's right. I sent out the announcement on the 9th - I got it, did anyone not? Copied below: >Oyez, oyez, oyez... the next meeting of Victoria.pm, the Victoria Perl >Mongers, will take place as follows: > >Date: Tuesday, July 16 >Time: 7:00pm >Place: McPherson Library, UVic > >We will gather from 6:45pm at the art gallery just inside the doors of >the McPherson Library; at 7pm, we will adjourn to a conference >room. It is not possible to know which room that will be before the >date but if you arrive late you can always look through the windows in >each one's door until you see something that looks like Perl. > >Last meeting's copious directions appeared merely to have confused >some people, so we will instead rely on your native intelligence to >find the place described. A camel will be in evidence when you've arrived. > >Absent any suggestions to the contrary I and/or others (hi, Abram!) >can give an extemporaneous introduction to object-oriented Perl >programming before we have Open Season. If anyone has any burning >issues they'd like explored at the Perl Conference in a few weeks, >please let me know. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From abez at abez.ca Fri Jul 12 10:49:08 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: Meeting In-Reply-To: <4.3.2.7.2.20020712083949.00ab1e60@shell2.webquarry.com> Message-ID: Well I guess that solves it :) No I did not receive this announcement. > > >Oyez, oyez, oyez... the next meeting of Victoria.pm, the Victoria Perl > >Mongers, will take place as follows: > > > >Date: Tuesday, July 16 > >Time: 7:00pm > >Place: McPherson Library, UVic > > > >We will gather from 6:45pm at the art gallery just inside the doors of > >the McPherson Library; at 7pm, we will adjourn to a conference > >room. It is not possible to know which room that will be before the > >date but if you arrive late you can always look through the windows in > >each one's door until you see something that looks like Perl. > > > >Last meeting's copious directions appeared merely to have confused > >some people, so we will instead rely on your native intelligence to > >find the place described. A camel will be in evidence when you've arrived. > > > >Absent any suggestions to the contrary I and/or others (hi, Abram!) > >can give an extemporaneous introduction to object-oriented Perl > >programming before we have Open Season. If anyone has any burning > >issues they'd like explored at the Perl Conference in a few weeks, > >please let me know. > > -- > Peter Scott > Pacific Systems Design Technologies > http://www.perldebugged.com/ > -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From peter at PSDT.com Tue Jul 16 03:08:00 2002 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: Meeting reminder Message-ID: <4.3.2.7.2.20020715114039.00afe8d0@shell2.webquarry.com> Reminder: meeting tonight (Tuesday): meet between 6:45 and 7pm in the art gallery just inside and right of the McPherson library entrance, UVic. Planned talk: Object-Oriented Perl. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From abez at abez.ca Wed Jul 17 11:35:41 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: Regex Question Message-ID: I'm having problems making a regex which does this finds all $varname ${varname} but doesn't find $varname{ my @all = ($k =~ /(\$[a-zA-Z_0-9]+)/g); my @all2 = ($k =~ m#(\$\{[a-zA-Z_0-9]+\})#g); I've tried ($k =~ /(\$[a-zA-Z_0-9]+)(?!\{)/g); but that doesn't work.. Basically my goal is to take a perl script and replace all variable name with randomized names so that the source code is an utter pain to deal with but it still works. -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From Peter at PSDT.com Wed Jul 17 12:24:23 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: Regex Question In-Reply-To: Message-ID: <4.3.2.7.2.20020717100509.00b043e0@shell2.webquarry.com> At 09:35 AM 7/17/02 -0700, abez wrote: >I'm having problems making a regex which does this > >finds all > >$varname >${varname} >but doesn't find >$varname{ > > my @all = ($k =~ /(\$[a-zA-Z_0-9]+)/g); > my @all2 = ($k =~ m#(\$\{[a-zA-Z_0-9]+\})#g); > >I've tried ($k =~ /(\$[a-zA-Z_0-9]+)(?!\{)/g); >but that doesn't work.. $ cat foo #!/usr/bin/perl -l use strict; use warnings; $_ = '$one ${two} $three{four}'; s/ ( \$ (\{)? \w+ \b (?(2) \} ) (?! \{ ) ) /\$XXX/gx; print; $ ./foo $XXX $XXX $three{four} >Basically my goal is to take a perl script and replace all variable name >with randomized names so that the source code is an utter pain to deal >with but it still works. Filter::decrypt, Acme::Buffy, Acme::Bleach, Acme::Morse, ... -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From Peter at PSDT.com Wed Jul 17 12:42:01 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: Regex Question In-Reply-To: <4.3.2.7.2.20020717100509.00b043e0@shell2.webquarry.com> References: Message-ID: <4.3.2.7.2.20020717104043.00b12100@shell2.webquarry.com> >At 09:35 AM 7/17/02 -0700, abez wrote: > >>I'm having problems making a regex which does this >> >>finds all >> >>$varname >>${varname} >>but doesn't find >>$varname{ >> >> my @all = ($k =~ /(\$[a-zA-Z_0-9]+)/g); >> my @all2 = ($k =~ m#(\$\{[a-zA-Z_0-9]+\})#g); >> >>I've tried ($k =~ /(\$[a-zA-Z_0-9]+)(?!\{)/g); >>but that doesn't work.. $ cat /tmp/foo #!/usr/bin/perl -l use strict; use warnings; { my %hashed; my @syms = ('A' .. 'Z', 'a' .. 'z'); sub randvar { my $v = shift; $hashed{$v} || ($hashed{$v} = join '' => map $syms[rand @syms] => 1 .. 1+rand 10); } } $_ = '$one ${two} $three{four} ${two} $one'; s/ (?<= \$ ) ( (\{)? \w+\b (?(2) \} ) (?! \{ ) ) /randvar($1)/gxe; print; $ /tmp/foo $J $qSq $three{four} $qSq $J $ /tmp/foo $zDo $oaKs $three{four} $oaKs $zDo -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From mskala at ansuz.sooke.bc.ca Wed Jul 17 21:58:05 2002 From: mskala at ansuz.sooke.bc.ca (mskala@ansuz.sooke.bc.ca) Date: Wed Aug 4 00:11:06 2004 Subject: Regex Question In-Reply-To: Message-ID: On Wed, 17 Jul 2002, abez wrote: > $varname > ${varname} > but doesn't find > $varname{ Balancing parentheses with a regular expression is in general impossible; in fact that's the subject of about a week's worth of lectures in third-year computer science. However, if you're reasonably sure that "varname" isn't going to contain {}s itself, then you can probably get away with something like this: /\$(\{[a-z]*\})|([a-z]*)/ Feel free to substitute something smarter than [a-z]* to match varname. The key is to repeat it, because if you try to match an optional {, varname, and then an optional }, there's no way to avoid matching ${varname . -- Matthew Skala mskala@ansuz.sooke.bc.ca Embrace and defend. http://ansuz.sooke.bc.ca/ From nkuipers at uvic.ca Mon Jul 22 19:29:59 2002 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:06 2004 Subject: thoughts on this script? Message-ID: <3D3CCB8C@wm2.uvic.ca> I'd like to hear anything anyone can say about this...what people would do differently, what they would think to talk about at our meetings after seeing this code, that sort of thing...anything really. I've tried to keep the code properly grouped and documented. Thanks in advance. -nathanael #Program name: parse_noncoding #Author: Nathanael Kuipers (nkuipers@uvic.ca) #Date written: July 22, 2002 #Last updated: July 22, 2002 #Purpose: parse a blastx xml file and find noncoding queries, then compare them # to a list of all queries and extract the corresponding sequences #Use: >perl path/parse_noncoding xmlfile masterfile #!/usr/bin/perl use strict; use warnings; my $infile1 = shift; my $infile2 = shift; my $iteration_message1= "No hits found"; my $iteration_message2= "BLASTSetUpSearch: Unable to calculate Karlin-Altschul"; my $query_def_prefix = ""; my $query_def_suffix = ""; my $query_def = ''; my @candidates = (); my $flag = 0; my $sequence = ''; my %final_list = (); open IN, $infile1 or die; # #parse the xml file and build an array of noncoding-DNA query-IDs # while () { if (/${query_def_prefix}(.*)${query_def_suffix}/) { $query_def = $1 } elsif (/${iteration_message1}/) { push @candidates, ">$query_def" } elsif (/${iteration_message2}/) { push @candidates, ">$query_def" } } # #compare each noncoding query to a master-list, write matching IDs and #corresponding DNA sequences to candidates file. as in the @candidates array, #query IDs in the master-file start with >. so the flag is set when #"begin sequence" and unset when "begin new query ID". # ROOT: for my $i (@candidates) { open IN, $infile2 or die; while () { if (/^${i}$/) { $flag = 1 } elsif ($flag && /^[acgtACGT]/) { $sequence .= $_ } elsif ($flag && /^>/) { chomp $sequence; $final_list{$i} = $sequence; $flag = 0; $sequence = ''; next ROOT } } } close IN; open OUT, ">>candidates" or die; # #print sorted hash (kind of) # my @sorted = sort keys %final_list; for (@sorted) { print OUT "$_\n$final_list{$_}\n"; } "I think for my lunch tomorrow I'll make a tuna and pickle triangle bunwich." From abez at abez.ca Thu Jul 25 11:23:31 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: thoughts on this script? In-Reply-To: <3D3CCB8C@wm2.uvic.ca> Message-ID: Just browsing the code nothing jumped out at me. Other than the use of the label and next. I'd generally go something like: while (!$done) { $done = 1; for () { if () { $done = 0; break; #reloop } } } Unless I'm reading that next wrong. On Mon, 22 Jul 2002, nkuipers wrote: > I'd like to hear anything anyone can say about this...what people would do > differently, what they would think to talk about at our meetings after seeing > this code, that sort of thing...anything really. I've tried to keep the code > properly grouped and documented. Thanks in advance. > > -nathanael > > #Program name: parse_noncoding > #Author: Nathanael Kuipers (nkuipers@uvic.ca) > #Date written: July 22, 2002 > #Last updated: July 22, 2002 > #Purpose: parse a blastx xml file and find noncoding queries, then compare > them > # to a list of all queries and extract the corresponding sequences > #Use: >perl path/parse_noncoding xmlfile masterfile > > #!/usr/bin/perl > > use strict; > use warnings; > > my $infile1 = shift; > my $infile2 = shift; > my $iteration_message1= "No hits found"; > my $iteration_message2= "BLASTSetUpSearch: Unable to calculate > Karlin-Altschul"; > > my $query_def_prefix = ""; > my $query_def_suffix = ""; > my $query_def = ''; > my @candidates = (); > > my $flag = 0; > my $sequence = ''; > my %final_list = (); > > open IN, $infile1 or die; > > # > #parse the xml file and build an array of noncoding-DNA query-IDs > # > > while () { > if (/${query_def_prefix}(.*)${query_def_suffix}/) { $query_def = $1 } > elsif (/${iteration_message1}/) { > push @candidates, ">$query_def" } > elsif (/${iteration_message2}/) { > push @candidates, ">$query_def" } > } > > # > #compare each noncoding query to a master-list, write matching IDs and > #corresponding DNA sequences to candidates file. as in the @candidates array, > #query IDs in the master-file start with >. so the flag is set when > #"begin sequence" and unset when "begin new query ID". > # > > ROOT: > for my $i (@candidates) { > open IN, $infile2 or die; > while () { > if (/^${i}$/) { $flag = 1 } > elsif ($flag && /^[acgtACGT]/) { $sequence .= $_ } > elsif ($flag && /^>/) { > chomp $sequence; > $final_list{$i} = $sequence; > $flag = 0; > $sequence = ''; > next ROOT } > } > } > > close IN; > open OUT, ">>candidates" or die; > > # > #print sorted hash (kind of) > # > > my @sorted = sort keys %final_list; > for (@sorted) { > print OUT "$_\n$final_list{$_}\n"; > } > > "I think for my lunch tomorrow I'll make a tuna and pickle triangle bunwich." > -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From nkuipers at uvic.ca Thu Jul 25 11:31:44 2002 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:06 2004 Subject: thoughts on this script? Message-ID: <3D3FCDEF@wm2.uvic.ca> >I'd generally go something like: >while (!$done) { > $done = 1; > for () { > if () { > $done = 0; > break; #reloop > } > > } >} > Unless I am mistaken, you are thinking in java...meaning, are ya SURE there is a break loop operator in Perl, or would last be a better choice. ;) Thanks for the tip though. anyways, i redid the script not too long after sending it out for feedback. it's more compact, sorts output, and is really quite fast. From abez at abez.ca Thu Jul 25 11:36:56 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: thoughts on this script? In-Reply-To: <3D3FCDEF@wm2.uvic.ca> Message-ID: last , break same thing :P My perl and java bleed into each other sometimes in Java I catch myself writing stuff like my int counter; or private $counter; On Thu, 25 Jul 2002, nkuipers wrote: > >I'd generally go something like: > >while (!$done) { > > $done = 1; > > for () { > > if () { > > $done = 0; > > break; #reloop > > } > > > > } > >} > > > > Unless I am mistaken, you are thinking in java...meaning, are ya SURE there is > a break loop operator in Perl, or would last be a better choice. ;) Thanks > for the tip though. > > anyways, i redid the script not too long after sending it out for feedback. > it's more compact, sorts output, and is really quite fast. -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From nkuipers at uvic.ca Thu Jul 25 11:54:50 2002 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:06 2004 Subject: my poetry at perlmonks Message-ID: <3D402FCD@wm2.uvic.ca> poem is called mmmmmmmm and it was submitted this AM. have a good day all, nathanael From pavel at md5.ca Thu Jul 25 12:23:32 2002 From: pavel at md5.ca (Pavel Zaitsev) Date: Wed Aug 4 00:11:06 2004 Subject: my poetry at perlmonks In-Reply-To: <3D402FCD@wm2.uvic.ca> References: <3D402FCD@wm2.uvic.ca> Message-ID: <20020725172332.GA11308@md5.ca> nice! p nkuipers(nkuipers@uvic.ca)@Thu, Jul 25, 2002 at 09:54:50AM -0700: > poem is called mmmmmmmm and it was submitted this AM. > > have a good day all, > > nathanael > > -- Create like god, rule like a king, work like a slave. From Peter at PSDT.com Thu Jul 25 13:25:44 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: thoughts on this script? Message-ID: <4.3.2.7.2.20020725112542.00ab1e30@localhost> At 09:36 AM 7/25/2002 -0700, abez wrote: >last , break same thing :P My perl and java bleed into each other >sometimes in Java I catch myself writing stuff like > > my int counter; Of course, you can actually do this in Perl (the classic my Dog $spot)... Peter Scott peter@psdt.com http://www.perldebugged.com From Peter at PSDT.com Thu Jul 25 13:32:28 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: thoughts on this script? In-Reply-To: <3D3CCB8C@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20020724181826.00aa3ba0@shell2.webquarry.com> At 05:29 PM 7/22/2002 -0700, nkuipers wrote: >I'd like to hear anything anyone can say about this...what people would do >differently, what they would think to talk about at our meetings after seeing >this code, that sort of thing...anything really. I've tried to keep the code >properly grouped and documented. Thanks in advance. > >-nathanael FWIW, I'd use one of the XML modules, probably XML::Twig. Peter Scott peter@psdt.com http://www.perldebugged.com From nkuipers at uvic.ca Thu Jul 25 19:17:38 2002 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:06 2004 Subject: where to look? Message-ID: <3D40A2DC@wm2.uvic.ca> Hello all, Here's the situation. I work as an analyst for a genomics lab. We have a dedicated local BLAST (http://www.ncbi.nih.gov/) server. Whether from the summer heat, or a failing drive, or an OS bug, or some combination of various factors, our server is crapping out too frequently. This is really annoying because we are often hammering it with really large queries that take up to days to complete. We replaced our drive, and currently we simply resort to running our big runs overnight when it's cooler and traffic from other labs is light, or constantly monitoring the status of the server with a ssh window running top. But this is tedious. And what if the server dies in the middle of the day when I'm at a seminar for 3 hours, and I come back to three hours wasted when a new process could have been running (we are pretty quick rebooting during the day;)? What I am therefore interested in is information on finding or writing a perl script that does the following: -monitors the BLAST run once fired up in the ssh terminal -if process has bad exit status, reconnect as soon as possible and -repeat the call to the original process, with same parameters I looked at interprocess communication chapter in the Camel 3rd ed, but most of what I saw there seemed to deal with sending/handling termination signals in case of an error, rather than dealing with a total server shut-down...is IO::Socket::INET what I want? Thanks in advance, nathanael From abez at abez.ca Thu Jul 25 19:36:51 2002 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:06 2004 Subject: where to look? In-Reply-To: <3D40A2DC@wm2.uvic.ca> Message-ID: Well for one you can run commands remotely using SSH so you could run your process remotely. I am unsure about the exit status but you could easily make a script to auto login and retry til it felt the process was finished. I recommend testing how SSH acts with exits codes and remote processes. Also remember to use timeouts otherwise you'll be bitten. On Thu, 25 Jul 2002, nkuipers wrote: > Hello all, > > Here's the situation. > > I work as an analyst for a genomics lab. We have a dedicated local BLAST > (http://www.ncbi.nih.gov/) server. Whether from the summer heat, or a failing > drive, or an OS bug, or some combination of various factors, our server is > crapping out too frequently. This is really annoying because we are often > hammering it with really large queries that take up to days to complete. We > replaced our drive, and currently we simply resort to running our big runs > overnight when it's cooler and traffic from other labs is light, or constantly > monitoring the status of the server with a ssh window running top. But this > is tedious. And what if the server dies in the middle of the day when I'm at > a seminar for 3 hours, and I come back to three hours wasted when a new > process could have been running (we are pretty quick rebooting during the > day;)? What I am therefore interested in is information on finding or writing > a perl script that does the following: > > -monitors the BLAST run once fired up in the ssh terminal > -if process has bad exit status, reconnect as soon as possible and > -repeat the call to the original process, with same parameters > > I looked at interprocess communication chapter in the Camel 3rd ed, but most > of what I saw there seemed to deal with sending/handling termination signals > in case of an error, rather than dealing with a total server shut-down...is > IO::Socket::INET what I want? > > Thanks in advance, > > nathanael > > -- ABeZ------------ ------- ------ - ---------- -- ------------ http://www.indexdirect.com/abez/ Abram Hindle (abez@abez.ca) ---- ------- ----------- ----------- - - ------ --------ABeZ From Peter at PSDT.com Fri Jul 26 11:34:55 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: where to look? In-Reply-To: <3D40A2DC@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20020726093127.00ab2dd0@localhost> At 05:17 PM 7/25/2002 -0700, nkuipers wrote: >Hello all, > >Here's the situation. > >I work as an analyst for a genomics lab. We have a dedicated local BLAST >(http://www.ncbi.nih.gov/) server. Whether from the summer heat, or a >failing >drive, or an OS bug, or some combination of various factors, our server is >crapping out too frequently. This is really annoying because we are often >hammering it with really large queries that take up to days to complete. We >replaced our drive, and currently we simply resort to running our big runs >overnight when it's cooler and traffic from other labs is light, or >constantly >monitoring the status of the server with a ssh window running top. But this >is tedious. And what if the server dies in the middle of the day when I'm at >a seminar for 3 hours, and I come back to three hours wasted when a new >process could have been running (we are pretty quick rebooting during the >day;)? What I am therefore interested in is information on finding or >writing >a perl script that does the following: > >-monitors the BLAST run once fired up in the ssh terminal >-if process has bad exit status, reconnect as soon as possible and >-repeat the call to the original process, with same parameters Maybe I'm missing something, but it seems that what you need to do is wrap code around the code doing the queries that checks for failure and restarts. Why not just: $done = 0; until ($done) { do_query(); if (query_succeeded()) { $done = 1 } } Peter Scott peter@psdt.com http://www.perldebugged.com From Peter at PSDT.com Fri Jul 26 19:33:11 2002 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:06 2004 Subject: where to look? In-Reply-To: <3D412634@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20020726173155.00aa4d30@localhost> At 09:52 AM 7/26/2002 -0700, nkuipers wrote: > >Maybe I'm missing something, but it seems that what you need to do is wrap > >code around the code doing the queries that checks for failure and > >restarts. Why not just: > >Well, you see all i do to get this going is type > > >blastall [parms] > >at my command prompt. Okay, so excuse me if I'm being dense, but why not just: $done = 0; until ($done) { system "blastall [parms]"; if (blastall_succeeded()) { $done = 1 } } Peter Scott peter@psdt.com http://www.perldebugged.com