wiki:TorqueUsage

Version 18 (modified by bas, 17 years ago) (diff)

--

Usage

In the pbs_python package the are two modules:

pbs
This python module wraps all the C-functions that are defined in pbs_ifl.h header file. The function names in the module are the same as for C.
PBSQuery
This is a python module build on top of the pbs python module. It can only be used for query purposes, eg: how many jobs, how many nodes, etc ..

PBS python module

As already mentioned this module use the same funcions names as the C-library. So you can use the man-pages that are include in Torque software to see which arguments are required and returned. Keep in mind that the following C-types will be converted to Python-type:

  • C linked list are converted to python list and vica versa
  • If C-struct is required then first allocate storage for it. The mostly used structs are:

How to use the pbs_python libary:

PBSQuery python module

As the name already suggested this modules ia only used to get statistics from the server. It can gather information about the following items:

  • job(s)
  • queue(s)
  • server
  • node(s)

The module has builtin documentation:

ipython
import PBSQuery
help PBSQuery

It has also a builtin demo:

ipython
import PBSQuery
PBSQuery.main()