Changeset 8424 for trunk/Ohana/src/opihi/pcontrol/check.c
- Timestamp:
- Aug 18, 2006, 1:44:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pcontrol/check.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pcontrol/check.c
r8296 r8424 1 1 # include "pcontrol.h" 2 3 char jobstate[7][32] = {"PENDING", "BUSY", "HUNG", "DONE", "KILL", "EXIT", "CRASH"};4 char hoststate[5][32] = {"IDLE", "BUSY", "DOWN", "DONE", "OFF"};5 2 6 3 int check (int argc, char **argv) { … … 18 15 if (!strcasecmp (argv[1], "JOB")) { 19 16 JobID = atoi (argv[2]); 17 18 SetCheckPoint (); // ensure the JOB is on one of the stacks 20 19 job = PullJobByID (JobID, &StackID); 21 20 if (job == NULL) { 22 21 gprint (GP_LOG, "job not found\n"); 22 ClearCheckPoint (); 23 23 return (FALSE); 24 24 } 25 gprint (GP_LOG, "STATUS %s\n", jobstate[StackID]);25 gprint (GP_LOG, "STATUS %s\n", GetJobStackName(StackID)); 26 26 gprint (GP_LOG, "EXITST %d\n", job[0].exit_status); 27 27 gprint (GP_LOG, "STDOUT %d\n", job[0].stdout_size); 28 28 gprint (GP_LOG, "STDERR %d\n", job[0].stderr_size); 29 29 PutJob (job, StackID, STACK_BOTTOM); 30 ClearCheckPoint (); 30 31 return (TRUE); 31 32 } … … 33 34 if (!strcasecmp (argv[1], "HOST")) { 34 35 HostID = atoi (argv[2]); 36 37 SetCheckPoint (); // ensure the HOST is on one of the stacks 35 38 host = PullHostByID (HostID, &StackID); 36 39 if (host == NULL) { 37 40 gprint (GP_LOG, "host not found\n"); 41 ClearCheckPoint (); 38 42 return (FALSE); 39 43 } 40 gprint (GP_LOG, "host %s\n", hoststate[StackID]);44 gprint (GP_LOG, "host %s\n", GetHostStackName(StackID)); 41 45 PutHost (host, StackID, STACK_BOTTOM); 46 ClearCheckPoint (); 42 47 return (TRUE); 43 48 } … … 46 51 return (FALSE); 47 52 } 48 49 XXX how do I handle objects which are in flight??
Note:
See TracChangeset
for help on using the changeset viewer.
