pbs_statjob(3B)
π NAME π
okay so this is pbs_statjob(3B) β yes, from the PBS manual, section 3B β and it is literally the function that goes βhey server, whatβs the status of these batch jobs?β π
pbs_statjob β obtain status of pbs batch jobs.
β¨ SYNOPSIS β¨
#include <pbs_error.h>
#include <pbs_ifl.h>
struct batch_status *pbs_statjob(int connect, char *id,
struct attrl *attrib, char *extend)
void pbs_statfree(struct batch_status *psj)
π¦ DESCRIPTION π¦
So you issue a batch request to obtain the status of a specified batch job or a set of jobs at a destination. Itβs giving βstatus check, but make it batch.β π
A Status Job batch request gets generated and sent to the server over the connection specified by connect, which is the return value of pbs_connect(). That connection is your little hotline to the batch server, bestie. βοΈ
The parameter id may be either a job identifier or a destination identifier. Two paths, one parameter β main character energy fr fr.
If id is a job identifier, it is the identifier of the job for which status is requested. It is specified in the form:
sequence_number.server
If id is a destination identifier, it specifies that status of all jobs at the destination (queue) which the user is authorized to see be returned. If id is the null pointer or a null string, the status of each job at the server which the user is authorized to see is returned. No cap, thatβs the whole βshow me everything Iβm allowed to seeβ vibe. π
The parameter attrib is a pointer to an attrl structure which is defined in pbs_ifl.h as:
struct attrl {
struct attrl *next;
char *name;
char *resource;
char *value;
};
The attrib list is terminated by the first entry where next is a null pointer. If attrib is given, then only the attributes in the list are returned by the server. Otherwise, all the attributes of a job are returned. When an attrib list is specified, the name member is a pointer to a attribute name as listed in pbs_alter(3) and pbs_submit(3). The resource member is only used if the name member is ATTR_l β otherwise it should be a pointer to a null string. The value member should always be a pointer to a null string. Yes, always. Thatβs the rule. π
The parameter extend is reserved for implementation defined extensions. TORQUE 2.0.0p1 added the #define'd constant string EXECQUEONLY to only retrieve jobs in execution queues. So if you see EXECQUEONLY, thatβs what itβs doing β execution queues only, periodt. π₯
The return value is a pointer to a list of batch_status structures or the null pointer if no jobs can be queried for status. The batch_status structure is defined in pbs_ifl.h as:
struct batch_status {
struct batch_status *next;
char *name;
struct attrl *attribs;
char *text;
}
It is up the user to free the structure when no longer needed, by calling pbs_statfree(). Thatβs your cleanup era β do not skip it, bestie. π§Ήπ
π SEE ALSO π
qstat(1B)pbs_connect(3B)
π DIAGNOSTICS π
When the batch request generated by pbs_statjob() function has been completed successfully and the status of each job has been returned by the batch server, the routine will return a pointer to the list of batch_status structures.
If no jobs were available to query or an error occurred, a null pointer is returned. The global integer pbs_errno should be examined to determine the cause. Thatβs your little clue bucket β check pbs_errno and find out what went sideways. π΅οΈββοΈβ¨
okay bestie, thatβs the whole page. The very last line is the footer, and itβs just Local plus the page name pbs_statjob(3B) β no extra date drama, no secret version lore. We love a low-key footer. π«Άπ
π¦ 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