pbs_stathook(3B)
β¨ 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 ofpbs_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_idspecifies a name, the attribute-value list for that hook is returned. - If
hook_idis a null string or a null pointer, the status of all hooks at the current server is returned.
- If
output_attribsβ pointer to a list of attributes to return. If this list is null, all attributes are returned. Each attribute is described in anattrlstructure, defined inpbs_ifl.has:
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,resourceshould 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
- nixos 26.05: openpbs 23.06.06-unstable-2026-04-02
- nixpkgs unstable: openpbs 23.06.06-unstable-2026-04-02
- Copyright (C) 1994-2021 Altair Engineering, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms