IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2009, 10:37:19 AM (17 years ago)
Author:
eugene
Message:

report pending / process time with status; cycle over all hosts for each of NEED, WANT, ANY, OLDWANT; wait up to 10 sec for WANT before giving up

File:
1 edited

Legend:

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

    r20047 r21379  
    33int check (int argc, char **argv) {
    44
     5  int N, Save;
    56  int JobID, HostID;
    67
     
    89  Job *job = NULL;
    910  Host *host = NULL;
     11
     12  Save = FALSE;
     13  if ((N = get_argument (argc, argv, "-save"))) {
     14    remove_argument (N, &argc, argv);
     15    Save = TRUE;
     16  }
    1017
    1118  if (argc != 3) {
     
    3946        gprint (GP_LOG, "HOSTNAME NONE\n");
    4047    }
     48
     49    if (Save) {
     50        set_str_variable ("JOB_STATUS", GetJobStackName(job[0].stack));
     51        set_int_variable ("JOB_EXITST", job[0].exit_status);
     52        set_int_variable ("JOB_STDOUT_SIZE", job[0].stdout.size);
     53        set_int_variable ("JOB_STDERR_SIZE", job[0].stderr.size);
     54        set_variable ("JOB_DTIME", job[0].dtime);
     55        set_str_variable ("JOB_HOSTNAME", job[0].hostname);
     56        if (job[0].realhost) {
     57            set_str_variable ("JOB_REALHOST", job[0].realhost);
     58        } else {
     59            set_str_variable ("JOB_REALHOST", "NONE");
     60        }
     61    }
     62
    4163    PushStack (stack, STACK_BOTTOM, job, job[0].JobID, job[0].argv[0]);
    4264    return (TRUE);
     
    5375    }
    5476    gprint (GP_LOG, "host %s\n", GetHostStackName(host[0].stack));
     77
     78    if (Save) {
     79        set_str_variable ("HOST_STATE", GetHostStackName(host[0].stack));
     80    }
     81
    5582    PushStack (stack, STACK_BOTTOM, host, host[0].HostID, host[0].hostname);
    5683    return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.