pbs_statserver(3B)

πŸ“¦ version 6.1.3, in epel 9, nixos 26.05, nixpkgs unstable

πŸ’… pbs_statserver(3B) β€” like, the whole vibe

okay so bestie, welcome to pbs_statserver, a manual page from the PBS corner of the universe (that's the 3B section, iykyk). It's literally the function that goes and asks a pbs batch server "hey girl, what's your status?" ✨


🌸 NAME 🌸

pbs_statserver β€” obtain status of a pbs batch server 🫢


πŸŽ€ SYNOPSIS πŸŽ€

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

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

void pbs_statfree(struct batch_status *psj)

πŸ¦‹ DESCRIPTION πŸ¦‹

So what we're doing here is issuing a batch request to obtain the status of a batch server. Very demure, very mindful. πŸ’–

A Status Server batch request gets generated and sent to the server over the connection specified by connect, which β€” and this is the key part, bestie β€” is the return value of pbs_connect().

The parameter attrib is a pointer to an attrl structure, and that structure 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. Periodt. 🎯

If attrib is given, then only the attributes in the list are returned by the server. Otherwise, all the attributes of the server are returned β€” the whole entire menu, no filter. πŸ“

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. And the value member should aways be a pointer to a null string. (Yes, the manpage really does say "aways" β€” I'm not fixing it, it's iconic. πŸ’€)

The parameter extend is reserved for implementation defined extensions. So like... not your business right now, don't touch. πŸ™ˆ

The return value is a pointer to a list of batch_status structures, which is defined in pbs_ifl.h as:

struct batch_status {
    struct batch_status *next;
    char                *name;
    struct attrl        *attribs;
    char                *text;
}
⚠️ bestie listen β€” it is up the user to free the space when no longer needed, by calling pbs_statfree(). That memory is YOUR responsibility. No one else is coming to clean it up for you. 😭

πŸ”₯ SEE ALSO πŸ”₯

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

πŸ‘‘ DIAGNOSTICS πŸ‘‘

When the batch request generated by pbs_statserver() function has been completed successfully by a batch server, the routine will return a pointer to a batch_status structure. Slay. βœ…

Otherwise, a null pointer is returned and the error code is set in pbs_errno. Not slay. πŸ’€ Check your pbs_errno, bestie.


and that's the whole page, no cap πŸ’œ this little beauty is from Local, version pbs_statserver(3B) β€” go forth and check those server statuses, you absolute icon πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from