Changeset 32632 for trunk/Ohana/src/opihi/pantasks
- Timestamp:
- Nov 8, 2011, 2:54:20 PM (15 years ago)
- Location:
- trunk/Ohana/src/opihi/pantasks
- Files:
-
- 9 edited
- 3 copied
-
ControllerOps.c (modified) (1 diff)
-
JobOps.c (modified) (1 diff)
-
LocalJob.c (modified) (1 diff)
-
Makefile (modified) (1 diff)
-
TaskOps.c (modified) (2 diffs)
-
init.c (modified) (2 diffs)
-
init_server.c (modified) (2 diffs)
-
pantasks_server.c.in (modified) (2 diffs)
-
task.c (modified) (1 diff)
-
task_nice.c (copied) (copied from branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/task_nice.c )
-
test/nice.sh (copied) (copied from branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/test/nice.sh )
-
test/nice_remote.sh (copied) (copied from branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/test/nice_remote.sh )
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/ControllerOps.c
r27491 r32632 258 258 sprintf (cmd, "job -host %s", job[0].task[0].host); 259 259 } 260 } 261 262 if (job[0].priority) { 263 char tmp[64]; 264 snprintf (tmp, 64, " -nice %d", job[0].priority); 265 strcat (cmd, tmp); 260 266 } 261 267 -
trunk/Ohana/src/opihi/pantasks/JobOps.c
r31666 r32632 107 107 job[0].mode = JOB_CONTROLLER; 108 108 } 109 job[0].priority = task[0].priority; 109 110 110 111 /* we need our own copy of task[0].argv argc is the number of valid args, like the usual command line. we -
trunk/Ohana/src/opihi/pantasks/LocalJob.c
r23530 r32632 161 161 if (VerboseMode()) gprint (GP_ERR, "local job launched\n"); 162 162 163 /* set nice level for the child process -- maybe I should not exit here... */ 164 if (job[0].priority) { 165 status = setpriority (PRIO_PROCESS, pid, job[0].priority); 166 if (status == -1) { 167 gprint (GP_ERR, "error setting priority\n"); 168 perror ("setpriority: "); 169 exit (2); 170 } 171 } 172 163 173 /* close the other ends of the pipes */ 164 174 close (stdout_fd[1]); stdout_fd[1] = 0; -
trunk/Ohana/src/opihi/pantasks/Makefile
r27995 r32632 83 83 $(SRC)/task.$(ARCH).o \ 84 84 $(SRC)/task_host.$(ARCH).o \ 85 $(SRC)/task_nice.$(ARCH).o \ 85 86 $(SRC)/task_nmax.$(ARCH).o \ 86 87 $(SRC)/task_active.$(ARCH).o \ -
trunk/Ohana/src/opihi/pantasks/TaskOps.c
r31856 r32632 487 487 488 488 NewTask[0].active = TRUE; 489 NewTask[0].priority = 0; 489 490 return (NewTask); 490 491 } … … 595 596 if (!strcasecmp (command, "END")) hash = TASK_END; 596 597 if (!strcasecmp (command, "HOST")) hash = TASK_HOST; 598 if (!strcasecmp (command, "NICE")) hash = TASK_NICE; 597 599 if (!strcasecmp (command, "NMAX")) hash = TASK_NMAX; 598 600 if (!strcasecmp (command, "ACTIVE")) hash = TASK_ACTIVE; -
trunk/Ohana/src/opihi/pantasks/init.c
r23530 r32632 4 4 int task PROTO((int, char **)); 5 5 int task_host PROTO((int, char **)); 6 int task_nice PROTO((int, char **)); 6 7 int task_nmax PROTO((int, char **)); 7 8 int task_npending PROTO((int, char **)); … … 33 34 {1, "halt", halt, "halt the scheduler (no job harvesting)"}, 34 35 {1, "host", task_host, "define host machine for a task"}, 36 {1, "nice", task_nice, "set nice priority level for a task"}, 35 37 {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"}, 36 38 {1, "kill", kill_job, "kill job"}, -
trunk/Ohana/src/opihi/pantasks/init_server.c
r23530 r32632 4 4 int task PROTO((int, char **)); 5 5 int task_host PROTO((int, char **)); 6 int task_nice PROTO((int, char **)); 6 7 int task_nmax PROTO((int, char **)); 7 8 int task_npending PROTO((int, char **)); … … 34 35 {1, "delete", delete_job, "delete job"}, 35 36 {1, "host", task_host, "define host machine for a task"}, 37 {1, "nice", task_nice, "set nice priority level for a task"}, 36 38 {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"}, 37 39 {1, "kill", kill_job, "kill job"}, -
trunk/Ohana/src/opihi/pantasks/pantasks_server.c.in
r27999 r32632 18 18 int main (int argc, char **argv) { 19 19 20 char hostname[256], portinfo[256]; 20 21 char log_stdout[1024], log_stderr[1024]; 21 22 pthread_t JobsAndTasksThread; … … 100 101 pass them to the ListenClient thread */ 101 102 103 /* find the defined server hostname */ 104 if (VarConfig ("PANTASKS_SERVER", "%s", hostname) == NULL) { 105 gprint (GP_ERR, "pantasks server host undefined\n"); 106 exit (31); 107 } 108 109 /* is a port range defined? otherwise use the default */ 110 memset (portinfo, 0, 256); 111 VarConfig ("PANTASKS_SERVER_PORT", "%s", portinfo); 112 102 113 /* create the listening socket */ 103 InitSocket = InitServerSocket (&Address );114 InitSocket = InitServerSocket (&Address, hostname, portinfo); 104 115 105 116 InitPassword (); -
trunk/Ohana/src/opihi/pantasks/task.c
r31666 r32632 72 72 case TASK_NMAX: 73 73 case TASK_HOST: 74 case TASK_NICE: 74 75 case TASK_EXIT: 75 76 case TASK_EXEC:
Note:
See TracChangeset
for help on using the changeset viewer.
