From: "Ron Santos" <ron@(email surpressed)>
Subject: addition to done/dump mail
   Date: Sun, 29 May 2005 20:57:16 -0700
Msg# 939
View Complete Thread (3 articles) | All Threads
Last Next
Would it be possible to also add the 'rush -lfi' output in the done/dump
mails?



   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: addition to done/dump mail
   Date: Tue, 31 May 2005 11:03:48 -0700
Msg# 940
View Complete Thread (3 articles) | All Threads
Last Next
Ron Santos wrote:
[posted to rush.general]

Would it be possible to also add the 'rush -lfi' output in the done/dump
mails?

Hi Ron,

	I'll add that to the wish list.

	Meanwhile, you can get this behavior by submitting your job with
	a 'jobdonecommand' that invokes a script that sends more customized
	emails.. for instance, in Unix, you could just use:

UNIX:
#!/bin/csh -f
#
# Use this script as your 'jobdonecommand'
#
set mailto = 'you@(email surpressed)'
( rush -lfi; rush -lf; rush -ljf ) |& Mail $mailto -s 'Finished job $RUSH_JOBID'


	Or a similar script can be written in perl that should work on all
	platforms, including Windows.

	(The following was hand modified without testing; there may be typos)

#!/usr/bin/perl -w
#
# Use this script as your 'jobdonecommand'
#
use strict;
use Net::SMTP;
my $mailto = 'you@(email surpressed)';	 # CHANGE THIS
my $relay = "relay.domain.com";  # CHANGE THIS
my $smtp = Net::SMTP->new($relay);
if ( ! defined($smtp) )
{
    # ERROR OCCURRED -- TRY AGAIN W/DEBUG ENABLED
    $smtp = Net::SMTP->new($relay, Debug => 1);
    if ( !defined($smtp) )
        { print "ERROR: Could not connect to $relay (see above)\n"; exit(1); }
}
my ($errs, $expect) = (0,0);
$expect++; $errs += $smtp->mail($mailto);
$expect++; $errs += $smtp->to($mailto);
$expect++; $errs += $smtp->data();
$expect++; $errs += $smtp->datasend("From: \"*** Rush ***\"<$mailto>\n");
$expect++; $errs += $smtp->datasend("To: $mailto\n");
$expect++; $errs += $smtp->datasend("Subject: Finished job $ENV{RUSH_JOBID}\n");
$expect++; $errs += $smtp->datasend("\n");
$expect++; $errs += $smtp->datasend("-- Frame Info:\n");
$expect++; $errs += $smtp->datasend(`rush -lfi`);
$expect++; $errs += $smtp->datasend("-- Frame List:\n");
$expect++; $errs += $smtp->datasend(`rush -lf`);
$expect++; $errs += $smtp->datasend("-- Job Full:\n");
$expect++; $errs += $smtp->datasend(`rush -ljf`);
$expect++; $errs += $smtp->dataend();
$expect++; $errs += $smtp->quit;
if ( $expect != $errs )
    { print "SMTP ERROR=".$smtp->cgi_error()."\n"; }


--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Cel: (Tel# suppressed)
Fax: (Tel# suppressed)

   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: addition to done/dump mail
   Date: Thu, 16 Jun 2005 00:20:43 -0700
Msg# 969
View Complete Thread (3 articles) | All Threads
Last Next
Ron Santos wrote:
Would it be possible to also add the 'rush -lfi' output in the done/dump
mails?

	Done; added to 102.42.

	The following shows the new email contents, with the frame info report
	in the middle, below the job report, above the frames report.

----------------------------------------------------------------------------- snip
From rush@XXX Thu Jun 16 00:13:23 2005
Date: Thu, 16 Jun 2005 00:13:22 -0700
From: rush@XXX
To: root@XXX
Subject: [ontario.3] _TEST_ (QUE=%0, DONE=%100, FAIL=%0)
Reply-To: rush@XXX
Errors-To: rush@XXX

--- Job Report:

          Jobid: ontario.3
          State: SaveJob
       ActState: SaveJob
       RebootId: 5
          Title: _TEST_
    DefPriority: 99
         LogDir: //meade/net/tmp/logs
         LogExt: -
       LogFlags: -
     ImgCommand:
            Ram: 1
           Nice: 10
        MaxCpus: 0
        MaxTime: 00:00:00
   MaxTimeState: que
   LicPauseSecs: 00:01:00
  LicPauseTimer: 00:00:00
     FrameFlags: off
        Command: rush -sleep 60
     ChkCommand:
 JobDoneCommand:
JobStartCommand:
 JobDumpCommand:
       AutoDump: off
   WaitForState: done
    WaitForTime: -
           User: erco (1000/1000)
       DoneMail: root@XXX
       DumpMail: -
      StartDate: Thu Jun 16 00:12:19 2005
        EndDate: -
        Elapsed: 00:01:03
         Frames: 10
      FramesQue: 0
      FramesRun: 0
     FramesDone: 10
     FramesFail: 0
     FramesHold: 0
           Cpus: +any=2@99
       Notes[0]: -
       Criteria:


--- Frame Info Report:                                                              <--- NEW REPORT

                                  Average    Total
Jobid            State Total Perc Elapsed    Elapsed    Average ETA
---------------- ----- ----- ---- ---------- ---------- ------------------------
ontario.3        Que   0     %0   -          -          -
ontario.3        Run   0     %0   -          -          -
ontario.3        Done  10    %100 00:00:12   00:02:02   Thu Jun 16 00:13:20 2005
ontario.3        Fail  0     %0   -          -          -
ontario.3        Hold  0     %0   -          -          -
ontario.3        ---
ontario.3        Render Elapsed: 00:01:01
ontario.3          Render Start: 06/16,00:12:19
ontario.3            Render End: 06/16,00:13:20

--- Frames Report:

STAT FRAME   TRY HOSTNAME        PID     JOBID            START          ELAPSED  NOTES
Done 0001    1   geneva          1428    ontario.3        06/16,00:12:19 00:01:01
Done 0002    1   rotwang         12125   ontario.3        06/16,00:12:19 00:01:01
Done 0003    0   -               0       ontario.3        00/00,00:00:00 00:00:00
Done 0004    0   -               0       ontario.3        00/00,00:00:00 00:00:00
Done 0005    0   -               0       ontario.3        00/00,00:00:00 00:00:00
Done 0006    0   -               0       ontario.3        00/00,00:00:00 00:00:00
Done 0007    0   -               0       ontario.3        00/00,00:00:00 00:00:00
Done 0008    0   -               0       ontario.3        00/00,00:00:00 00:00:00
Done 0009    0   -               0       ontario.3        00/00,00:00:00 00:00:00
Done 0010    0   -               0       ontario.3        00/00,00:00:00 00:00:00

----------------------------------------------------------------------------- snip

--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Cel: (Tel# suppressed)
Fax: (Tel# suppressed)