The research Sun Ultra-Enterprise 3000 has begun being used more and more extensively for multiple large-scale, long-running jobs, such as SAS and Maple and others. Characteristically, a user will fire up a number of these executions simultaneously, possibly under the mistaken assumption that running such jobs at the same time will not have adverse consequences.
This is *not* the case: running multiple large-scale jobs actually *decreases* the total-time-to-completion over all jobs, besides greatly impacting the useability of the resource for all other users. In the interest of accommodating the need to queue up a number of jobs for unattended execution, a new batching facility has been developed and installed on the Sun; the following discussion assumes a "cshell" login environment, "sh" and "ksh" users should contact me for how this will work in their environments.
In your "~/.cshrc" file, add the following line verbatim:
alias batch 'nohup batch.pl -c \!^ -e -o >& \!^.log &'
Then, the next time you login, create a file containing the commands you want to have run, one command per line; say that you name this file "batch_cmds". Now, to use the batch utility, all you have to type is:
batch batch_cmds
and then do whatever else you have to do, or log out -- your commands will now be run, one-at-a-time. A logfile is created and maintained, named the same as your command file with an appended ".log" (i.e., in this case it would be "batch_cmds.log"), and will automatically track:
1. the cmd being executed,
2. the pid it's running under,
3. the time it started,
4. all stdout and stderr output not handled from within your cmd,
5. its exit-status (whether or not it ended normally and, if not, what kind of error was reported), and
6. the time it stopped.
That way, you can come back at any time and check to see where your jobs are, and what kinds of problems (if any) had been encountered.
Thank Dr. Doug Elias, the director of information technology, for writing this script.