IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31666


Ignore:
Timestamp:
Jun 22, 2011, 12:38:55 AM (15 years ago)
Author:
eugene
Message:

merged from branch: add some more info stats

Location:
trunk/Ohana/src/opihi/pantasks
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/CheckTasks.c

    r23555 r31666  
    6161      JobTaskLock();
    6262      if (!status) {
     63        task[0].Nskipexec ++;
    6364        continue;
    6465      }
  • trunk/Ohana/src/opihi/pantasks/JobOps.c

    r27435 r31666  
    8282  gprint (GP_LOG, " Jobs in Pantasks Queue\n");
    8383  for (i = 0; i < Njobs; i++) {
    84     gprint (GP_LOG, " %d: %-15s %5d %20s (%lx)\n", Njobs, jobs[i][0].task[0].name, jobs[i][0].JobID, jobs[i][0].argv[0], (long) jobs[i][0].argv);
     84    gprint (GP_LOG, " %4d  %6d: %-25s %10s %20s\n", Njobs, jobs[i][0].JobID, jobs[i][0].task[0].name, JobStateToString(jobs[i][0].state), jobs[i][0].argv[0]);
    8585  }
    8686
     
    280280  return (job[0].state);
    281281}
     282
     283static char *JobStateNone    = "NONE";
     284static char *JobStateBusy    = "BUSY";
     285static char *JobStateExit    = "EXIT";
     286static char *JobStateHung    = "HUNG";
     287static char *JobStateCrash   = "CRASH";
     288static char *JobStatePending = "PENDING";
     289
     290char *JobStateToString (JobStat state) {
     291
     292  switch (state) {
     293    case JOB_NONE:
     294      return JobStateNone;
     295    case JOB_BUSY:
     296      return JobStateBusy;
     297    case JOB_EXIT:
     298      return JobStateExit;
     299    case JOB_HUNG:
     300      return JobStateHung;
     301    case JOB_CRASH:
     302      return JobStateCrash;
     303    case JOB_PENDING:
     304      return JobStatePending;
     305    default:
     306      return JobStateNone;
     307  }     
     308  return JobStateNone;
     309}
     310
  • trunk/Ohana/src/opihi/pantasks/TaskOps.c

    r26946 r31666  
    151151        free (stop);
    152152      }
     153      gprint (GP_LOG, "     Nskip exec: %d\n", tasks[i][0].Nskipexec);
    153154      if (tasks[i][0].host == NULL) {
    154155        gprint (GP_LOG, "    task runs locally\n");
  • trunk/Ohana/src/opihi/pantasks/client_shell.c

    r8548 r31666  
    2222    if (Nbad == 10) exit (3);
    2323
    24     line = readline (prompt);
     24    line = opihi_readline (prompt);
    2525
    2626    if (line == NULL) {
     
    3737    }
    3838    Nbad = 0;
    39     ohana_memregister (line);
    4039
    4140    stripwhite (line);
  • trunk/Ohana/src/opihi/pantasks/notes.txt

    r23530 r31666  
     1
     22011.06.01
     3
     4  addressing some details:
     5
     6  tasks->Njobs:
     7    ++ : CheckTasks.c:86 after successful submission
     8
     9  tasks->Nsuccess:
     10    ++ : CheckJobs.c:126 : on exit if exit_status == 0
     11 
     12  tasks->Nfailure:
     13    ++ : CheckJobs.c:102 : on exit if exit_status == 0
     14    ++ : CheckJobs.c:123 : on crash
     15
     16  tasks->Ntimeout:
    117
    218stdout_cntl:
  • trunk/Ohana/src/opihi/pantasks/status_server.c

    r27435 r31666  
    11# include "pantasks.h"
     2// this is the server version of the status_sys function (status.c)
     3// the server verion needs to include locks on the jobs.
    24
    35int status_scheduler(void);
  • trunk/Ohana/src/opihi/pantasks/task.c

    r23530 r31666  
    3434    /* get the next line (from correct place) */
    3535    if (ThisList == 0)
    36       input = readline (prompt);
     36      input = opihi_readline (prompt);
    3737    else
    3838      input = get_next_listentry (ThisList);
     
    4646      input = strcreate ("end");
    4747    }
    48     if (ThisList == 0) ohana_memregister (input);
    4948
    5049    stripwhite (input);
  • trunk/Ohana/src/opihi/pantasks/task_macros.c

    r23530 r31666  
    112112    /* get the next line (from correct place) */
    113113    if (ThisList == 0)
    114       input = readline (prompt);
     114      input = opihi_readline (prompt);
    115115    else
    116116      input = get_next_listentry (ThisList);
     
    124124      input = strcreate ("end");
    125125    }
    126     if (ThisList == 0) ohana_memregister (input);
    127126
    128127    stripwhite (input);
Note: See TracChangeset for help on using the changeset viewer.