IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 15, 2007, 3:54:25 PM (19 years ago)
Author:
eugene
Message:

better job status information

File:
1 edited

Legend:

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

    r11388 r12466  
    6464
    6565  int i;
     66  int status;
     67  char command[1024];
     68  IOBuffer buffer;
    6669
    6770  gprint (GP_LOG, "\n");
     
    7174  }
    7275
    73   gprint (GP_LOG, " Jobs\n");
     76  gprint (GP_LOG, " Jobs in Pantasks Queue\n");
    7477  for (i = 0; i < Njobs; i++) {
    7578    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);
    7679  }
     80
     81  /* check if controller is running */
     82  status = CheckControllerStatus ();
     83  if (!status) {
     84    return;
     85  }
     86
     87  sprintf (command, "jobstack busy");
     88  InitIOBuffer (&buffer, 0x100);
     89
     90  SerialThreadLock ();
     91  status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
     92  SerialThreadUnlock ();
     93
     94  if (status) {
     95    gprint (GP_LOG, " jobs currently running remotely:\n");
     96    gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
     97  } else {
     98    gprint (GP_LOG, "controller is not responding\n");
     99  }
     100  FreeIOBuffer (&buffer);
    77101  return;
    78102}
Note: See TracChangeset for help on using the changeset viewer.