[torqueusers] ANNOUNCE: New version of openpbs/torque python interface (3.2.0)
Bas van der Vlies
basv at sara.nl
Mon May 18 02:50:41 MDT 2009
=========== 3.2.0
- PBSQuery:
New data structure. In the old structure it is a dictionary
with a value and the value is a string. This is changed
that dictionary values are now of type list or dictionary depends
on the value of the keyword, eg for a node:
- np = 2:
* node['np'] = [ '2' ]
- properties = cores2, mem4gb, parallel
* node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ]
- status = arch=x86_64,sessions=22599,,size=70627864kb, ...
* node['status']['arch'] = [ 'x86_64' ]
* node['status']['sessions'] = [ '222599' ]
* ...
The data structure is activated by the function:
* new_data_structure()
In a future release it will be come the default.
example:
p = PBSQuery()
p.new_data_structure()
nodes = p.getnodes()
print nodes.np, nodes['np']
Author: Bas van der Vlies
- PBSQuery
For old and new data structure we now can use another syntax:
* node['np'] and node.np are equivalent
This new syntax works for all keywords.
Author: Bas van der Vlies
- Added iter object for job, node, queue and server objects, eg:
node = p.getnode('gb-r1n1')
print node.name
for attrib in node:
print '%\t%s = %s' %(attrib, node[attrib])
Author: Bas van der Vlies
- fixed an error in getnode, getqueue and getjob, return empty
dictionary if not found
Author: Bas van der Vlies
- New build system for rpm packages, make -f Makefile.rpm
Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr>
Applied: Bas van der Vlies
==============================================================
the latest stable pbs_python interface is available from:
ftp://ftp.sara.nl/pub/outgoing/pbs_python.tar.gz
Information, documentation and reporting bugs for the package:
https://subtrac.sara.nl/oss/pbs_python
===== Brief description =========================================
Pbs_python interface is a wrapper class for the OPENPBS/TORQUE C LIB
API. Now you can write utilities/extensions in Python instead of C.
--- Testing the package:
The test programs are include as a reference how to use the pbs
python module. You have to edit some test programs to reflect
your PBS/Torque installation.
pbsmon.py - ascii xpbsmon
rack_pbsmon.py - ascii xpbsmon by rack layout
pbsnodes-a.py - pbsnodes -a
pbs_version.py - print server version
set_property.py - set some node properties
resmom_info.py - queries the pbs_mom daemon on the nodes
logpbs.py - Shows the usage of the PBS logging routines
new_interface.py - Example how to use PBSQuery module
PBSQuery.py - python <install_path>/PBSQuery.py (has builtin demo)
For more info about SARA see:
http://www.sara.nl/index_eng.html
--
********************************************************************
* Bas van der Vlies e-mail: basv at sara.nl *
* SARA - Academic Computing Services Amsterdam, The Netherlands *
********************************************************************
More information about the torqueusers
mailing list