IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 2, 2011, 5:03:06 PM (15 years ago)
Author:
bills
Message:

Add a task to periodically gather the postage stamp server status and save
it into a file in the pstamp/web directory rather than getting the status directly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_server_status

    r30317 r30469  
    2525
    2626pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    27 #pod2usage( -msg => "Required options: --first --stage",
    28 #          -exitval => 3) unless
    29 #    defined $first and
    30 #    defined $stage;
    3127
    3228# Look for programs we need
     
    3935}
    4036
     37# XXX: Note under pantasks this will be the curent directory, so this
     38# isn't necessary if the pstamp/web stuff is configured to point at the
     39# ipp build. But currently it's running out of Bill's build
    4140my $ipphome = "/home/panstarrs/ipp";
     41my $status_cmd = "psstatus";
     42
    4243$rundir = "$ipphome/pstamp" if !$rundir;
    4344
     
    5051    exit 0;
    5152}
     53
     54my $now = `date -u`;
     55
     56print "<b>Status updated: &nbsp;&nbsp;&nbsp;</b> $now<br /><br />\n";
    5257
    5358my ($pts, $pantasks_script) = tempfile ('/tmp/pts.XXXX', UNLINK => !$save_temps);
     
    138143        print "Task pstamp.job.run not found.<br />\n";
    139144    }
     145
     146    # now run the script psstatus to check the status of running requests and finished requests
    140147    print "<br /><b>Unfinished Requests</b><br />\n";
    141148    print "<pre>\n";
    142     system "/home/panstarrs/bills/ipp/tools/psstatus -r ";
     149    system "$status_cmd --running";
    143150    print "</pre>\n";
     151
     152if (0) {
     153    # these are included in running requests above
     154    print "<br /><b>Requests building results fileset</b><br/>\n";
     155    print "<pre>\n";
     156    system "$status_cmd --finishing";
     157    print "</pre>\n";
     158}
     159
    144160    print "<br /><b>Requests completed in last 24 hours (most recently completed first)</b><br />\n";
    145161    print "<pre>\n";
    146     # finished requests
    147     system "/home/panstarrs/bills/ipp/tools/psstatus -f";
     162    system "$status_cmd --finished";
    148163    print "</pre>\n";
     164
    149165} else {
    150166    print "Task pstamp.request.run not found.\n";
     
    153169
    154170
    155 
    156171exit 0;
Note: See TracChangeset for help on using the changeset viewer.