pbs_statserver(3B)

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

✨ NAME ✨

pbs_statserver β€” get status of a PBS batch server. this is the pbs_statserver(3B) manual, and it’s literally here to make the whole status-check situation make sense πŸ’…

🌸 SYNOPSIS 🌸

bestie, here’s the C signature in all its glory:

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

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so: this function issues a batch request to get the status of a batch server. it generates a Status Server (21) batch request and sends it to the server over the connection specified by connect. periodt. ✨

πŸ’œ ARGUMENTS πŸ’œ

let’s go through these one by one, no skipping πŸ™ˆ

  • connect β€” return value of pbs_connect(). specifies the connection handle over which to send the batch request to the server.
  • output_attribs β€” pointer to a list of attributes to return. if this argument is a null pointer or points to a null string, 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. iconic but unused, honestly 🫢

🧚 Members of attrl Structure

okay, here’s what each member is giving:

  • 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.
  • value β€” points to a string containing the value of the attribute or resource. should always be a pointer to a null string.
  • next β€” points to next attribute in list. a null pointer terminates the list.

πŸ‘‘ RETURN VALUE πŸ‘‘

returns a pointer to a batch_status structure describing the server. slay.

if an error occurred, the routine returns a null pointer, and the error number is available in the global integer pbs_errno. so if you get a null pointer, check pbs_errno, bestie 😭

πŸ’€ 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, you must free the batch_status structure when no longer needed, by calling pbs_statfree(). do not skip this, fr fr πŸ’€

🌈 SEE ALSO 🌈

go check these out:

  • qstat(1B)
  • pbs_connect(3B)
  • pbs_statfree(3B)

✨ Sign-off: source/version vibes are PBS Professional / Local, date is 15 November 2019, page is pbs_statserver(3B) β€” byeee, go get that server status πŸ’–

πŸ“¦ where this page comes from