pbs_manager(3B)

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

πŸ’… NAME πŸ’…

okay bestie, welcome to pbs_manager(3B) from PBS Professional β€” this one is all about modifying a PBS batch object. 🫢

✨ SYNOPSIS ✨

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

int pbs_manager(int connect, int command, int object_type,
                char *object_name, struct attropl *attrib_list,
                char *extend)

🌸 DESCRIPTION 🌸

So pbs_manager issues a batch request to perform administrative functions at a server. It generates a Manager (9) batch request and sends it to the server over the connection specified by connect. ✨

You can use this to create, delete, and set attributes of objects such as queues. It’s giving admin main character energy, fr fr. πŸ‘‘

πŸ‘‘ REQUIRED PRIVILEGE πŸ‘‘

This function requires Manager or Operator privilege depending on the operation, and root privilege when used with hooks.

When not used with hooks:

  • Functions MGR_CMD_CREATE and MGR_CMD_DELETE require PBS Manager privilege.
  • Functions MGR_CMD_SET and MGR_CMD_UNSET require PBS Manager or Operator privilege.

When used with hooks:

  • All commands require root privilege on the server host.
  • Functions MGR_CMD_IMPORT, MGR_CMD_EXPORT, and MGR_OBJ_HOOK are used only with hooks, and therefore require root privilege on the server host.
  • Hook commands are run at the server host.

πŸ¦‹ ARGUMENTS πŸ¦‹

  • connect β€” Return value of pbs_connect(). Specifies the connection over which to send the batch request to the server.
  • command β€” Operation to be performed. Valid values are specified in pbs_ifl.h.
  • object_type β€” Specifies the type of object on which the command is to operate. Valid values are specified in pbs_ifl.h.
  • object_name β€” Name of the object on which to operate.
  • attrib_list β€” Pointer to a list of attributes to be operated on. Each attribute is described in an attropl structure, defined in pbs_ifl .h as:
struct attropl {
        struct attropl *next;
        char           *name;
        char           *resource;
        char           *value;
        enum batch_op  op;
};
  • extend β€” Character string for extensions to the command. Not currently used.

🧚 Members of attropl Structure 🧚

  • next β€” Points to the next attribute in the list. A null pointer terminates the list.
  • 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.

If the resource is already present in the object’s attribute, the value is altered as specified. Otherwise the resource is added.

  • value β€” Points to a string containing the new value of the attribute or resource. For parameterized limit attributes, this string contains all parameters for the attribute.
  • op β€” Defines the manner in which the new value is assigned to the attribute or resource. The operators used for this function are SET, UNSET, INCR, DECR.

🌈 USAGE FOR HOOKS 🌈

Hook girlies, this part is for you πŸ’–

πŸŽ€ When importing a hook or hook configuration file πŸŽ€

  • Set command to MGR_CMD_IMPORT.
  • Set object_type to SITE_HOOK (or PBS_HOOK if you are importing a configuration file for a built-in hook; you cannot import a built-in hook).
  • Set object_name to the name of the hook.
  • In one attropl structure:
    • Set name to "content-type".
    • Set value to "application/x-python" for a hook, or "application/x-config" for a configuration file.
  • In another attropl structure:
    • Set name to "content-encoding".
    • Set value to "default" or "base64".
  • In a third attropl structure:
    • Set name to "input-file".
    • Set value to the name of the input file.
  • Set op to SET.

πŸ“ When exporting a hook or hook configuration file πŸ“

  • Set command to MGR_CMD_EXPORT.
  • Set object_type to SITE_HOOK (or PBS_HOOK if you are exporting a configuration file for a built-in hook; you cannot export a built-in hook).
  • Set object_name to the name of the hook.
  • In one attropl structure:
    • Set name to content-type.
    • Set value to "application/x-python" for a hook, or "application/x-config" for a configuration file.
  • In another attropl structure:
    • Set name to "content-encoding".
    • Set value to "default" or "base64".
  • In another attropl structure:
    • Set name to "output-file".
    • Set value to "default" or "base64".
  • In a third attropl structure:
    • Set name to "output-file".
    • Set value to the name of the output file.
  • Set op to SET.
yes bestie, the page really lists output-file in those two separate blocks β€” I’m preserving it exactly, no edits to the lore πŸ’€

πŸ”₯ RETURN VALUE πŸ”₯

The routine returns 0 (zero) on success. ✨

If an error occurred, the routine returns a non-zero exit value, and the error number is available in the global integer pbs_errno.

⭐ SEE ALSO ⭐

  • qmgr(1B)
  • pbs_connect(3B)

mwah πŸ’‹ β€” this page’s source/version tag is Local, it’s dated 6 May 2020, and it’s the pbs_manager(3B) page. Bye bestie, go slay those batch objects πŸ‘‘βœ¨

πŸ“¦ where this page comes from