pbs_statque(3B)

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

πŸ’… pbs_statque(3B) β€” get status of PBS queue(s)

okay so this is a PBS Professional manpage, third section of the library docs, and bestie, it's literally the glow-up you need for peeking at your queues ✨


🌸 SYNOPSIS

#include <pbs_error.h>
#include <pbs_ifl.h>

struct batch_status *
pbs_statque(int connect, char *target, struct attrl *output_attribs,
            char *extend)

like, that's the whole signature, no cap 🫢


✨ DESCRIPTION

Okay so what this does: it issues a batch request to get the status of PBS queues. That's it, that's the vibe πŸ’…

It generates a Status Queue (20) batch request and sends it to the server over the connection specified by connect. Iconic.

Then it returns either the specified attributes, or all attributes of the specified queue, or all attributes of all the queues. You get to choose your own adventure, main character energy πŸ”₯


πŸŽ€ ARGUMENTS

  • connect β€” this is the return value of pbs_connect(). It specifies the connection handle over which to send the batch request to the server. It's giving "your server's phone number" πŸ₯°
  • target β€” the name of the queue whose attributes are to be reported. If this argument is null, it returns attributes of all queues known to the server. so NULL = everybody, periodt πŸ‘‘
  • output_attribs β€” pointer to a list of attributes to return. If this argument is a null pointer or points to a null string, it returns all attributes. Each attribute is described in an attrl structure, defined in pbs_ifl.h as:
struct attrl {
        char         *name;
        char         *resource;
        char         *value;
        struct attrl *next;
};
  • extend β€” character string for extensions to command. Not currently used. lowkey just sitting there being a placeholder, we respect it πŸ™ˆ

πŸ¦‹ 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. Used only when the specified attribute contains resource information. Otherwise, resource should be a null pointer. so like, don't be weird about it πŸ’€
  • value β€” points to a string containing the value of the attribute or resource.
  • next β€” points to next attribute in list. A null pointer terminates the list. it's a linked list bestie, you know how this goes ⭐

🌈 RETURN VALUE

Returns a pointer to a list of batch_status structures describing the queue(s). slay.

If an error occurred, the routine returns a null pointer, and the error number is available in the global integer pbs_errno. so like, check that πŸ’œ

🧚 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

⚠️ bestie listen to me: you must free the list of batch_status structures when no longer needed, by calling pbs_statfree(). don't just leave it lying around, that's a memory leak and it's not the vibe 😭

πŸ‘‘ SEE ALSO

qstat(1B), pbs_connect(3B), pbs_statfree(3B) β€” go read those too, iykyk πŸ’–


anyway that's the whole thing, mwah 🫢 this page is Local, dated 15 November 2019, and it's from PBS Professional β€” go forth and stat those queues βœ¨πŸŽ€

πŸ“¦ where this page comes from