SGE_SHEPHERD(8)
π NAME π
sge_shepherd β the Grid Engine single job-controlling agent π (yes, that's the whole NAME section, and yes, it's section 8 of the manual, iykyk)
π SYNOPSIS π
sge_shepherd
β¨ DESCRIPTION β¨
Okay so bestie, sge_shepherd is the one holding down the parent process role for a single Grid Engine job. Why does a job even need a parent, you ask? Because on UNIX systems you literally cannot retrieve resource usage information (see getrusage(2)) after a job has finished without somebody hanging around to collect it. That somebody is the shepherd π«Ά. On top of that, sge_shepherd forwards signals to the job β the suspension, enabling, termination kind, plus the Grid Engine checkpointing signal (see sge_ckpt(1) and queue_conf(5) for the full deets).
The shepherd gets all its info about the job it's about to start from sge_execd(8). And during the execution of that job it actually spins up up to 5 child processes, in this exact order:
- a prolog script, run first β but only if this feature is enabled by the
prologparameter in the cluster configuration (seesge_conf(5)) - a parallel environment startup procedure β but only if the job is a parallel job (see
sge_pe(5)for more) - the job itself π
- a parallel environment shutdown procedure, for parallel jobs
- an epilog script, last β but only if requested by the
epilogparameter in the cluster configuration
The prolog and epilog scripts, plus the parallel environment startup and shutdown procedures, are provided by the Grid Engine administrator, and they're intended for site-specific actions taken before and after execution of the actual user job. Not yours to write, but iconic of them to exist π.
Once the job has finished and the epilog script is processed, sge_shepherd retrieves resource usage statistics about the job, places them in a job-specific subdirectory of the sge_execd(8) spool directory for reporting through sge_execd(8), and finishes. Clean exit, no drama β¨.
The shepherd also places an exit status file in the spool directory. You can view this exit status with qacct -j JobId (see qacct(1)). But heads up bestie β it is not the exit status of sge_shepherd itself, it's the exit status of one of the methods executed by sge_shepherd. And its meaning shifts depending on which method an error occurred in (if any). The possible methods are: prolog, parallel start, job, parallel stop, epilog, suspend, restart, terminate, clean, migrate, and checkpoint.
The following exit values are returned:
0β All methods: the operation was executed successfully. slay π99β Job script, prolog and epilog: whenFORBID_RESCHEDULEis not set in the configuration (seesge_conf(5)), the job gets re-queued. Otherwise see "Other".100β Job script, prolog and epilog: whenFORBID_APPERRORis not set in the configuration (seesge_conf(5)), the job gets re-queued. Otherwise see "Other".- Other β and this is where it gets spicy πΆοΈ:
- Job script: this is the exit status of the job itself. No action is taken upon this exit status because the meaning of this exit status is not known.
- Prolog, epilog and parallel start: the queue is set to error state and the job is re-queued.
- Parallel stop: the queue is set to error state, but the job is not re-queued. It is assumed that the job itself ran successfully and only the clean up script failed.
- Suspend, restart, terminate, clean, and migrate: always successful.
- Checkpoint: success, except for kernel checkpointing: checkpoint was not successful, did not happen (but migration will happen).
For the meaning of the return codes of the shepherd itself (which are interpreted by qacct(1)), go read sge_status(5).
π« RESTRICTIONS π«
sge_shepherdshould not be invoked manually, bestie. Only bysge_execd(8). Hands off, this one is not for you π
π ENVIRONMENT VARIABLES π
SGE_ROOTβ Specifies the location of the Grid Engine standard configuration files.SGE_CELLβ If set, specifies the default Grid Engine cell. To address a Grid Engine cellsge_execduses (in the order of precedence):- The name of the cell specified in the environment variable
SGE_CELL, if it is set. - The name of the default cell, i.e.
default.
- The name of the cell specified in the environment variable
SGE_ENABLE_COREDUMPβ If set, enable core dumps on Linux when theadmin_useris not root. Linux normally disables core dumps when the daemon has changed uid or gid. SettingSGE_ENABLE_COREDUMPinsge_execd's environment defeats that to enable core dumps for debugging if they are otherwise allowed. This is typically not a big hazard with SGE, since most information is exposed in the spool area anyhow. Dumps will appear in the qmaster spool directory, which need not be world-readable. On Solaris,coreadm(1)may be used to enable such dumps.SGE_CGROUP_DIRβ If Linux cgroups handling is enabled, this variable names a directory under the cgroup mount point in which to create job-specific directories. The default issge.SGE_CELLso, for instance, the cpuset cgroup for a job might be/sys/fs/cgroup/cpuset/sge.default/123.
π FILES π
sgepasswd contains a list of user names and their corresponding encrypted passwords. If available, the password file will be used by sge_shepherd. To change the contents of this file please use the sgepasswd command. It is not advised to change that file manually. fr fr, don't.
<execd_spool>/job_dir/<job_id>β job specific directory<sge_root>/<cell>/common/sgepasswdβ Password information used on Microsoft Windows hosts. Seesgepasswd(5).
π SEE ALSO π
sge_intro(1), sge_conf(5), sge_status(5), remote_startup(5), sgepasswd(5), sge_execd(8).
Β©οΈ COPYRIGHT Β©οΈ
See sge_intro(1) for a full statement of rights and permissions.
and that's the whole vibe check, bestie π this page lives in SGE 8.1.3pre, stamped $Date: 2007-07-19 09:04:33 $ β go forth and let sge_execd(8) do the calling, mwah ππ
π¦ where this page comes from
- debian bookworm: gridengine-exec 8.1.9+dfsg-10+b1 Β· SISSL
- debian trixie: gridengine-exec 8.1.9+dfsg-13.1 Β· SISSL
- ubuntu jammy: gridengine-exec 8.1.9+dfsg-10build1 Β· SISSL
- ubuntu noble: gridengine-exec 8.1.9+dfsg-11build3 Β· SISSL
- ubuntu questing: gridengine-exec 8.1.9+dfsg-13.1
- ubuntu resolute: gridengine-exec 8.1.9+dfsg-13.2 Β· SISSL
- ubuntu stonking: gridengine-exec 8.1.9+dfsg-13.2ubuntu1 Β· SISSL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms