pbs_attach(8B)
π pbs_attach β attach a session ID to a PBS job π
okay bestie, welcome to pbs_attach(8B) from PBS Professional β the little command that's gonna glue a whole session of processes to a PBS job so MoM can keep an eye on them. no cap, it's giving backstage-pass energy. β¨
β¨ NAME β¨
pbs_attach β attach a session ID to a PBS job
π SYNOPSIS π
Linux
pbs_attach [-j <job ID>] [-m <port>] -p <PID>
pbs_attach [-j <job ID>] [-m <port>] [-P] [-s] <cmd> [<arg> ...]
pbs_attach --version
Windows
pbs_attach [-c <path to script>] [-j <job ID>] [-m <port>] -p <PID>
pbs_attach [-c <path to script>] [-j <job ID>] [-m <port>] [-P] [-s]
<cmd> [<arg> ...]
pbs_attach --version
π¦ DESCRIPTION π¦
so the pbs_attach command associates the processes in a session with a PBS job β by attaching the session ID to the job. literally that's the whole vibe. this is what lets PBS MoM monitor and control those processes. π
MoM uses process IDs to figure out session IDs, and those session IDs get put into MoM's task list (attached to the job). then all the process IDs in a session are associated with the job. fr fr, the whole squad gets linked up.
when a command cmd is given as an operand, the pbs_attach process becomes the parent process of cmd, and the session ID of pbs_attach is attached to the job. main character behavior tbh. π
π₯ OPTIONS π₯
-c <path to script>β Windows only, bestie! the specified command gets invoked using a new command shell. if you wanna spawn and attach built-in DOS commands likesetorecho, you need to open the task using acmdshell. the new command shell,cmd.exe, is attached as a task to the PBS job.pbs_attachspawns a program using a new command shell when attaching a batch script, or when invoked with the-coption. πͺ-j <job ID>β the job ID that the session ID is gonna be attached to. if you don't specify a job ID, a best effort is made to determine the job to attach the session to. iykyk, it'll try its best. π-m <port>β the port where we contact MOM. default: the value ofPBS_MANAGER_SERVICE_PORTfrompbs.conf. β¨-p <PID>β the process ID whose session ID is to be attached to the job. default: the process ID ofpbs_attach. cannot be used with the-Por-soptions or thecmdoperand. pick a lane, babe. π-Pβ attaches the sessions of bothpbs_attachand the parent ofpbs_attachto the job. when used with the-soption, the sessions of the newfork()edpbs_attachand its parent (which ispbs_attach) are attached to the job. cannot be used with the-por-soptions or thecmdoperand. π-sβ starts a new session and attaches it to the job:pbs_attachcallsfork(), then the childpbs_attachfirst callssetsid()and then callstm_attachto attach the new session to the job. the session ID of the newpbs_attachis attached to the job. iconic fresh-start moment. πΈ--versionβpbs_attachreturns its PBS version information and exits. this option can only be used alone, periodt. β
π OPERANDS π
cmdβ name of the command whose process ID is to be associated with the job. π«Ά
π EXIT STATUS π
0β success β¨1β any error following successful command line processing. a message is printed to standard error. π
if cmd is specified, pbs_attach waits for cmd to exit, then exits with the exit value of cmd.
if cmd is not specified, pbs_attach exits after attaching the session ID(s) to the job.
π SEE ALSO π
pbs_mom(8B), pbs_tmrsh(8B), setsid(2), tm(3)
ngl bestie, if you're attaching sessions, double-check those incompatible flag combos β-pwith-P/-s/cmdis a no, and-Pwith-p/-s/cmdis also a no. the manpage said it, not me. π
and that's the whole page, fr fr! this local edition is dated 6 May 2020 β so cute, so classic. go attach those sessions and slay, bestie πππ¦
π¦ where this page comes from
- nixos 26.05: openpbs 23.06.06-unstable-2026-04-02
- nixpkgs unstable: openpbs 23.06.06-unstable-2026-04-02
- Copyright (C) 1994-2021 Altair Engineering, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms