pbs_connect(3B)
Bestie, this is pbs_connect(3B) from the PBS manual โ yes, the batch-server PBS โ and itโs literally the โopen the connection firstโ moment of the whole API. ๐ซถโจ
๐ NAME ๐
pbs_connect โ connect to a pbs batch server. Thatโs the whole vibe: youโre linking up to the batch server so the rest of the pbs_ girlies can do their thing. ๐
๐ฆ SYNOPSIS ๐ฆ
#include <pbs_error.h>
#include <pbs_ifl.h>
int pbs_connect(char *server)
extern char *pbs_server;
โจ DESCRIPTION โจ
Okay so hereโs the tea: a virtual stream (TCP/IP) connection gets established with the server specified by server. Thatโs the whole point of pbs_connect() โ connection era, no cap. ๐
๐จ Bestie, listen: this function must be called before any of the otherpbs_functions. They will transmit their batch requests over the connection established by this function. So yes,pbs_connect()is the main character, and everyone else is riding the connection it opened.
Multiple requests may be issued over the connection before it is closed. So you can absolutely send a little group chat of batch requests, not just one message. ๐ฌ
The connection should be closed by a call to pbs_disconnect() when all requests have been sent to the server. Thatโs the โokay bye, love youโ of this whole situation. ๐ซถ
The parameter, server, is of the form host_name[:port], see section 2.7.9. If port is not specified, the standard PBS port number will be used. ๐
If the parameter, server, is either the null string or a null pointer, a connection will be opened to the default server. The default server is defined by:
- (a) the setting of the environment variable
PBS_DEFAULT, which contains a destination, or - (b) the destination in the batch administrator established file
{PBS_DIR}/default_destn.
So like, blank server doesnโt mean โnowhereโ โ it means โdefault server, please and thank you.โ ๐
The variable pbs_server, declared in pbs_ifl.h, is set on return to point to the server name to which pbs_connect() connected or attempted to connect. Yes, even the attempted-to-connect case keeps that pointer pointed at the server name, bestie. ๐
๐ธ SEE ALSO ๐ธ
Go read these next, because the PBS lore is deep and honestly kind of iconic:
qsub(1B)pbs_alterjob(3B)pbs_deljob(3B)pbs_disconnect(3B)pbs_geterrmsg(3B)pbs_holdjob(3B)pbs_locate(3B)pbs_manager(3B)pbs_movejob(3B)pbs_msgjob(3B)pbs_rerunjob(3B)pbs_rlsjob(3B)pbs_runjob(3B)pbs_selectjob(3B)pbs_selstat(3B)pbs_sigjob(3B)pbs_statjob(3B)pbs_statque(3B)pbs_statserver(3B)pbs_submit(3B)pbs_terminate(3B)pbs_server(8B)- and the PBS External Reference Specification
๐ DIAGNOSTICS ๐
When the connection to batch server has been successfully created, the routine will return a connection identifier which is positive. Slay. Positive number = connection created, bestie. โ
Otherwise, a negative value is returned. Not slay. โ
The error number is set in pbs_errno. So if it goes negative, check pbs_errno for the details โ thatโs where the drama is documented. ๐ฅ
xoxo, from the Local edition of pbs_connect(3B) ๐
โ the source footerโs date slot is blank, so Iโm not inventing a date, bestie. ๐โจ
๐ฆ where this page comes from
- epel 9: torque-devel 6.1.3-8.el9 ยท OpenPBS and TORQUEv1.1
- nixos 26.05: torque 6.1.3h2
- nixpkgs unstable: torque 6.1.3h2
- Copyright (c) 1999-2000 Veridian Information Solutions, Inc
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms