pbs_stathook(3B)

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

✨ NAME ✨

okay so bestie, this is pbs_stathook(3B) β€” the glow-up API that gets status information about PBS site hooks. literally its whole job. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

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

void pbs_statfree(struct batch_status *psj)

🌸 DESCRIPTION 🌸

So what does it do? It issues a batch request to get the status of a specified site hook or a set of site hooks at the current server. iconic behavior, no cap. ✨

It generates a Status Hook batch request and sends it to the server over the connection specified by connect.

πŸ”’ Required Privilege

This API can be executed only by root on the local server host. not me casually forgetting that and wondering why everything is on fire 😭


πŸ¦‹ ARGUMENTS πŸ¦‹

  • connect β€” the return value of pbs_connect(). It specifies the connection handle over which to send the batch request to the server.
  • hook_id β€” a hook name, a null string, or a null pointer.
    • If hook_id specifies a name, the attribute-value list for that hook is returned.
    • If hook_id is a null string or a null pointer, the status of all hooks at the current server is returned.
  • output_attribs β€” pointer to a list of attributes to return. If this list is null, all attributes are returned. 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 β€” a character string where you can specify limits or extensions of your selection.

πŸ’œ 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.
  • value β€” should always be a pointer to a null string.
  • next β€” points to the next attribute in the list. A null pointer terminates the list.

πŸ”₯ RETURN VALUE πŸ”₯

It returns a pointer to a list of batch_status structures for the specified site hook. If no site hook can be queried for status, it returns the null pointer.

If an error occurred, the routine returns a null pointer, and the error number is available in the global integer pbs_errno.

🫢 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(). yes bestie, clean up after yourself β€” the server is not your personal landfill πŸ’€


🌈 SEE ALSO 🌈

pbs_hook_attributes(7B), pbs_connect(3B), pbs_statfree(3B)


okay that’s the whole page, bestie β€” this little pbs_stathook(3B) moment comes from the Local source/version and is dated 19 July 2020. slay, go query those hooks responsibly πŸŽ€βœ¨

πŸ“¦ where this page comes from