IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20324


Ignore:
Timestamp:
Oct 21, 2008, 7:06:44 PM (18 years ago)
Author:
eugene
Message:

adding logging to job selection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c

    r18098 r20324  
    11# include "pcontrol.h"
     2
     3static FILE *logfile = NULL;
    24
    35/* the supplied host is not on a stack: it cannot be taken by the other thread */
     
    79  Stack *stack;
    810  Job *job;
     11
     12  if (logfile == NULL) {
     13    logfile = fopen ("pcontrol.log", "w");
     14  }
    915
    1016  ASSERT (host, "host not set");
     
    3238    host[0].job = (struct Job *) job;
    3339
     40    if (logfile) fprintf (logfile, "start needhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
     41
    3442    /* take the job off the stack and unlock the stack */
    3543    RemoveStackEntry (stack, i);
     
    5058    host[0].job = (struct Job *) job;
    5159
     60    if (logfile) fprintf (logfile, "start wanthost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
     61
    5262    /* take the job off the stack and unlock the stack */
    5363    RemoveStackEntry (stack, i);
     
    6676    host[0].job = (struct Job *) job;
    6777
     78    if (logfile) fprintf (logfile, "start  anyhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
     79
    6880    /* take the job off the stack and unlock the stack */
    6981    RemoveStackEntry (stack, i);
     
    8092    if (job[0].mode != PCONTROL_JOB_WANTHOST) continue;
    8193    // XXX test the job age and skip if too young
     94
     95    if (logfile) fprintf (logfile, "start wanthost(2) %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
    8296
    8397    /* we have found an appropriate job; link it to the host and send to StartJob */
Note: See TracChangeset for help on using the changeset viewer.