pbs_statrsc(3B)
okay bestie, welcome to pbs_statrsc(3B) from PBS Professional β the little man page that's literally all about getting the status of PBS resources π
β¨
πΈ NAME πΈ
pbs_statrsc is your go-to for getting the status of PBS resources. That's it, that's the assignment, and it ate π
β¨ SYNOPSIS β¨
#include <pbs_error.h>
#include <pbs_ifl.h>
struct batch_status *
pbs_statrsc(int connect, char *rescname, struct attrl *output_attribs,
char *extend)
π¦ DESCRIPTION π¦
okay so this routine issues a batch request to query and return the status of a specified resource, or a whole set of resources at a server.
It generates a Status Resource (82) batch request and sends it to the server over the connection specified by connect. periodt.
π ARGUMENTS π
connectβ return value ofpbs_connect(). Specifies the connection handle over which to send the batch request to the server.rescnameβ name of the resource to be queried. If this is null, queries all resources at 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 anattrlstructure, defined inpbs_ifl.has:
struct attrl {
char *name;
char *resource;
char *value;
struct attrl *next;
};
extendβ character string for extensions to command. Not currently used.
π«Ά 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. 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.
π QUERYING RESOURCES AT SERVER π
Use the pbs_connect() command to get a connection handle at the server.
To query all resources at the server, pass a null pointer as the name of the resource. easy peasy, but don't forget the null pointer, bestie π«Ά
π₯ RETURN VALUE π₯
For a single resource, if the resource can be queried, returns a pointer to a batch_status structure containing the status of the specified resource.
If the resource cannot be queried, the routine returns a null pointer, and the error number is available in the global integer pbs_errno.
When querying a server, the connection to the server is already established by pbs_connect(). If there are resources at the server, returns a pointer to a batch_status structure describing the queryable resource(s) at the server. In the unlikely event that the server does not contain any queryable resources because the user is unprivileged and all resources are marked as invisible (the i flag is set), returns a NULL pointer, and pbs_errno is set to PBSE_NONE (0).
π 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(). no leaks, bestie, we don't do that here πβ¨
π SEE ALSO π
qstat(1B)pbs_connect(3B)pbs_statfree(3B)
okay that's the whole vibe! this page is from Local, dated 15 November 2019, and the manual is pbs_statrsc(3B) β bye bestie, go query those resources ππ¦β¨
π¦ 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