pbs_statresv(3B)

πŸ“¦ version 23.06.06-unstable-2026-04, in nixos 26.05, nixpkgs unstable

πŸ’… 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 of pbs_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 an attrl structure, which is defined in pbs_ifl.h as:
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, resource should 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