pbs_statresv(3B)
π pbs_statresv β like, the whole vibe check for your PBS reservations
okay bestie, so this one lives in the 3B section of the PBS Professional manual, and it's genuinely one of my faves β it's the function that goes "hey server, tell me everything about this reservation" π like it's asking for the tea and the server delivers.
β¨ NAME β¨
pbs_statresv β get the status of PBS reservation(s). that's it, that's the tweet. it fetches reservation status. slay. π
πΈ SYNOPSIS πΈ
#include <pbs_error.h>
#include <pbs_ifl.h>
struct batch_status *
pbs_statresv(int connect, char *target, struct attrl *output_attribs,
char *extend)
look at her. four arguments, one very iconic return type. no cap. β¨
π¦ DESCRIPTION π¦
So what she does: she issues a batch request to get the status of PBS reservation(s). that's the whole job. π«Ά
Under the hood β and this is the fun part β she generates a Status Reservation (71) batch request and sends it off to the server over the connection you gave her in connect. that's literally the number: 71. iconic little request code. π
And what comes back? she returns either:
- the specific attributes you asked for, or
- all the attributes of a specific reservation, or
- all the attributes of literally all the reservations.
your call, main character. π
π ARGUMENTS π
connectβ this is the return value ofpbs_connect(). it's the connection handle β the little thread you're holding that lets her send the batch request over to the server. β¨targetβ the ID of the reservation whose attributes are gonna be reported. but here's the thing: if this argument is a null pointer or points to a null string, you get attributes of all the reservations the user is authorized to query. generous queen. π
The format for an advance reservation:
R<sequence number>.<server name>
The format for a standing reservation:
S<sequence number>.<server name>
The format for a maintenance reservation:
M<sequence number>.<server name>
one letter, one sequence number, one dot, one server name. iykyk. π
output_attribsβ pointer to a list of attributes to return. if this argument is null, she returns all attributes (again, generous). each attribute is described in anattrlstructure, which is defined inpbs_ifl.has:
struct attrl {
char *name;
char *resource;
char *value;
struct attrl *next;
};
extendβ a character string for extensions to the command. not currently used. so likeβ¦ she's there, she's invited, she's just not doing anything rn. π
π Members of attrl Structure
nameβ points to a string containing the name of the attribute. π·οΈresourceβ points to a string containing the name of a resource. this one's only used when the specified attribute contains resource information. otherwise,resourceshould be a null pointer. no random strings, bestie. keep it null. β¨valueβ points to a string containing the value of the attribute or resource. the actual content. πnextβ points to the next attribute in the list. a null pointer terminates the list. so the null is basically the "ok bye" at the end of the chain. π
π₯ RETURN VALUE π₯
Returns a pointer to a list of batch_status structures describing the reservation(s). π
If an error occurred, the routine returns a null pointer, and the error number is available in the global integer pbs_errno. so when you get nothing back, go check pbs_errno β she left a note, fr fr. π
π The batch_status Structure
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;
}
π§ CLEANUP π§
You must free the list of batch_status structures when no longer needed, by calling pbs_statfree(). no cap β this is not optional, bestie. she's not gonna tidy up after herself, you have to. π«Ά
memory leaks are not the vibe. call pbs_statfree(). periodt. π
β SEE ALSO β
pbs_rstat(1B)pbs_connect(3B)pbs_statfree(3B)
and that's the page, bestie π this local edition of pbs_statresv(3B) is from the PBS Professional set, dated 15 November 2019 β go forth and stat those reservations, you absolute icon. πΈβ¨
π¦ 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