IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 28, 2010, 11:51:46 AM (16 years ago)
Author:
eugene
Message:

redirect pcontrol stderr to log file; add bits to harvest zombies that may accumulate

File:
1 edited

Legend:

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

    r26411 r28158  
    88static float MAX_WANTHOST_WAIT = 10.0;
    99static float MAX_CONNECT_TIME = 36000.0;
    10 static FILE *logfile = NULL;
    1110
    1211  /* if this host has been connected for too long, disconnect (will automatically reconnect) */
     
    3534  struct timeval now;
    3635  float dtime;
    37 
    38   if (logfile == NULL) {
    39     logfile = fopen ("pcontrol.log", "w");
    40   }
    4136
    4237  ASSERT (host, "host not set");
     
    6964    host[0].job = (struct Job *) job;
    7065
    71     // if (logfile) fprintf (logfile, "start needhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
     66    // gprint (GP_ERR, "start needhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
    7267    AddMachineJob (host, job);
    7368
     
    9085    host[0].job = (struct Job *) job;
    9186
    92     // if (logfile) fprintf (logfile, "start wanthost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
     87    // gprint (GP_ERR, "start wanthost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
    9388    AddMachineJob (host, job);
    9489
     
    111106    host[0].job = (struct Job *) job;
    112107
    113     // if (logfile) fprintf (logfile, "start  anyhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
     108    // gprint (GP_ERR, "start  anyhost %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
    114109    AddMachineJob (host, job);
    115110
     
    133128    if (!CheckMachineJobs (host, job)) continue;
    134129
    135     if (logfile) fprintf (logfile, "start wanthost(2) %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
     130    gprint (GP_ERR, "start wanthost(2) %s (job host %s) : %s\n", host[0].hostname, job[0].hostname, job[0].argv[0]);
    136131    AddMachineJob (host, job);
    137132
Note: See TracChangeset for help on using the changeset viewer.