pbs_statnode(3B)

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

πŸ’– NAME πŸ’–

okay bestie, this is pbs_statnode(3B) from the PBS manual, and it’s literally the page about how to obtain status of pbs nodes.

✨ SYNOPSIS ✨

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

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

void pbs_statfree(struct batch_status *psj)

πŸ¦‹ DESCRIPTION πŸ¦‹

So you issue a batch request to obtain the status of a PBS node or nodes. A Status Node batch request is generated and sent to the server over the connection specified by connect, which is the return value of pbs_connect().

The id is the name of a node or the null string. If id specifies a node name, the status of that node will be returned. If the id is a null string (or null pointer), the status of all nodes at the server will be returned.

In TORQUE 2.1.0, if the id starts with a ":" and followed by a node property, all nodes with that property are returned; creating a β€œnode group” functionality. The string ":ALL" is specially handled and is the same as passing a null string.

The parameter, attrib, is a pointer to an attrl structure which 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. If attrib is given, then only the attributes in the list are returned by the server. Otherwise, all the attributes of a node are returned. When an attrib list is specified, the name member is a pointer to a attribute name. The supported attribute names relating to nodes are "state", "properties", "np", "ntype", "jobs", "status", and "note". The resource member is not used and must be a pointer to a null string. The value member should β€” yes, the original really spells it β€œaways” β€” be a pointer to a null string.

The parameter, extend, is reserved for implementation defined extensions.

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;
}

It is up the user to free the structure when no longer needed, by calling pbs_statfree().

🌈 SEE ALSO 🌈

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

🩺 DIAGNOSTICS 🩺

When the batch request generated by pbs_statnode() function has been completed successfully by a batch server, the routine will return a pointer to the batch_status structure. Otherwise, a null pointer is returned and the error code is set in the global integer pbs_errno.


πŸ’… and that’s the page bestie! The footer stamps it as pbs_statnode(3B) with source/version Local; there’s no actual date on the original footer, so I’m not gonna invent one β€” periodt. 🫢

πŸ“¦ where this page comes from