source: trunk/CHANGES

Last change on this file was 368, checked in by bas, 5 years ago

sara_nodes also displays NHC offline notes,

  • Property svn:keywords set to Id
File size: 24.4 KB
Line 
1=========== 4.6.6
2 * PBSQuery do not parse simple values. else rendering of offline not
3   goes wrong.
4   Author: Bas van der Vlies
5
6=========== 4.6.4
7 * Use system Python instead of environment Python.
8   Author: Martijn Kruiten
9
10=========== 4.6.3
11 * Added basic compatibilty with Python 3.x.
12   Author: Martijn Kruiten
13
14=========== 4.6.1
15 * Patched sara_nodes to work with the pbs and PBSQuery modules
16   Author: Dennis Stam
17
18=========== 4.6.0
19 * Added support for torque version 5.x. Note: the rm interface does not work for me on debian wheezy.
20   Author: Bas van der Vlies
21
22 * PBSQuery had been update to new cpuid range for torque 5
23   Author: stijnd : deweirdt add ugent dot be
24   Applied by : Bas van der Vlies
25
26=========== 4.5.0
27 * new_rack_pbsmon.py: Added option -j/--job. It will show the nodes that are used by the specified job
28 Author: Dennis Stam
29
30 * JobscriptParser.py: Added a new usefull script which parses the jobscript and returns the attropl as datastructure
31 Author: Dennis Stam
32 
33
34=========== 4.4.1
35 * new_rack_pbsmon.py: Added option -p/--property to filter on torque node properties. It will show
36   the nodes that meet the property request with a capital M on a non-color terminal and in green on
37   color terminals.
38 Requested by: Willem Vermin and Wim Rijks
39 Author: Dennis Stam
40
41 * Fixed docdir bug in configure.in and Makefile.in, closes #39
42 Author: Dennis Stam
43
44=========== 4.4.0
45 * Drop support for versions older then 2.4
46 Author: Bas van der Vlies
47
48 * Added support for torque version >= 4.2
49 Author: Bas van der Vlies
50
51 * rewrote setup.py.in
52 Inspired by: stijn dot deweirdt at ugent dot be
53 Author: Bas van der Vlies
54
55 * docdir is now configurable, closes #37
56 Author: jens dot timmerman add ugent dot be
57 Applied by: Bas van der Vlies
58
59 * The swig development environment to generate the pbs_python package
60   is now available at:
61    - svn co https://oss.trac.surfsara.nl/pbs_python/svn/devel
62
63=========== 4.3.7
64 * pbs_jobmonitor/pbs_joblogin ported to torque 2.5 to fix jobarrays
65  Author: Willem Vermin (SURFsara)
66  Applied by: Bas van der Vlies
67 
68=========== 4.3.6
69 * Modified sara_nodes.py and new_rack_pbsmon.py so:
70   - We using argparse instead of OptionParser
71   - Changed the print statement to an print function which will work with Python 2.5+
72   - Removed module PBSAdvancedParser.py
73   Author: Dennis Stam
74
75=========== 4.3.5
76 * PBSQuery bugfix, parsing of node status line with multiple EVENT: settings
77   was wrong
78   Author: Bas van der Vlies
79
80 * Added an example how to make use of the EVENT status message:
81    - examples/pbs_script.sh
82   Author: Bas van der Vlies
83
84 * implemented __nonzero__ for PBS dictionary, closes #33, eg:
85    status = getjob(id)
86    if status:
87        do something
88    else:
89        no job
90  Author: Bas van der Vlies
91
92 * PBSQuery bugfix. getjob() can now handle short jobname, eg:
93    * p.getjob('6073545')
94
95   Author: Willem Vermin (SARA) & Bas van der Vlies
96
97 * added an example: pbs_jobmonitor shows the output of top
98   -u user on the node
99    - one cycle of top
100    - user: the user the job belongs to
101
102   renamed as pbs_joblogin logs in to the node as the user
103   who invokes this script (os.getenv('USER'))
104
105   Author: Willem Vermin (SARA)
106 
107=========== 4.3.3
108 * New generated files for pbs_wrap.c and pbs.py to support python 3.X versions
109   Reported by: Steve Traylen <steve dot traylen add cern dot ch>
110   Author: Bas van der Vlies
111
112 * Fixed AdvancedParser when using 01-12 range the zero was not appended.
113   Reported by: Ramon Bastiaans
114   Author: Dennis Stam
115
116 * examples/sara_nodes.py: Catch the PBSQuery error if we can not make a
117   connection with the batch server and exit the program.
118   Author: Bas van der Vlies
119
120 * Remove the debian dependency on AdvancedParser. We now have
121   our own PBSAdvanceParser so it does not conflict with other SARA
122   packages.
123   Reported by: Ramon Bastiaans (SARA)
124   Fixed by: Bas van der Vlies
125
126 * Make pbs_torque only dependend on libtorque instead of torque and adjusted
127   the maintainer of the package, closes #30
128   Reported by: Guillermo Marcus  <guillermo dot marcus add@gmail dot com>
129   Fixed by: Bas van der Vlies
130   
131=========== 4.3.0
132 * new_rack_pbsmon.py: For backward compatibility added -a/--all option.
133   Has the same functionality as -s/--summary
134   Author: Bas van der Vlies
135
136 * Added some license info to debian package and include GPL and LGPL 3.0
137   files.
138   Suggested by: W. Trevor King <wking at drexel dot edu>
139
140 * PBSQuery.py: Added support for new feature in node status field:
141    * message=EVENT:<key=value:>+
142    * message=ERROR <text>
143
144  Added the following syntax for node:
145        * node['error']
146    * node['event']
147
148  eg: node: n1
149    state = free
150    np = 8
151    properties = ib,switch1,highmem
152    ntype = cluster
153    jobs = 0/567403.sara.nl, 1/567403.sara.nl
154    status = ..,loadave=0.00,message=EVENT:sample.time=1288864220.003:cputotals.user=0:iconnect.pktout=0,netload=3487600394,state=free,...
155
156  example code:
157        p = PBSQuery()
158    node = p.getnode(n1)
159    print node.event['sample.time']
160    print node['event']['sample.time']
161
162   Requested by: Roy Dragseth <roy dot dragseth add uit dotno>
163   Author: Bas van der Vlies
164
165=========== 4.2.0
166 * Updated LICENSE file to LGPLV3. Thanks to Justin Bronder
167   (jsbronder add gentoo dot org) for the information and
168   explanation.
169
170 * examples/pbsmon.py. Patched so it also works for torque 2.5
171   Author: Stijn De Weirdt stijn dot deweirdt at ugent dot be
172   Applied by: Bas van der Vlies
173
174 * setup.py.in changed determine which torque version is installed
175   so we also support snapshots.
176   Author: Mark Roberts ( mark at gingergeeks dot co dot uk)
177   Applied by: Bas van der Vlies
178
179 * PBSQuery:
180   - get_nodes function for jobs now works for old and new datastructure and
181     gives correct results if unique=True
182     Reported by + idea for patch: Shunjie Lau (eijnuhs add gmail dot com)
183     Author: Bas van der Vlies
184
185 * Added AdvanceParser module. new_rack_pbsmon.py and sara_nodes.py make use of
186   this module
187   Author: Dennis Stam (Dennis dot Stam at sara dot nl)
188
189 * examples/new_rack_pbsmon.py:
190     - Better specification for node expression
191     - added a new option -l/--list to list the state of a nodes and which job
192       is running on it, eg:
193             new_rack_pbsmon.py - l gb-r[1-3]n[3-6] gb-r4[n1-20]
194
195   Authors: Dennis Stam & Bas van der Vlies
196   Applied by: Bas van der Vlies
197
198 * examples/sara_nodes.py:
199   An utility to set/clear notes for multiple nodes, see ..
200   Author: Dennis Stam (Dennis dot Stam at sara dot nl)
201
202 * setup.py.in:
203   Added support for runtime-libraries when torque is installed in a non-default
204   location, closes #22
205   Author: Mattias (slabanja at chalmers dot se)
206   Applied by: Bas van der Vlies
207
208 * Changed build system for debian
209   Authors: Dennis Stam & Bas van der Vlies
210
211=========== 4.1.2
212 * examples/new_rack_pbsmon.py now uses the new PBSQuery data
213   structure.
214   Author: Bas van der Vlies
215
216 * PBSQuery:
217     - fixed and error in get_jobs function for nodes. Did not
218       support new data structure and uniq did not work.
219       Authors: Shunjie Lau <eijnuhs at gmail dot com> and Bas van der Vlies
220
221=========== 4.1.0
222 * Delete function pbs.version() replaced by
223    * pbs.version
224        This is a string variable
225    * pbs.version_info
226        Is a tuple variable. So we can use it in scripts
227
228   This analogue with sys module, closes #20
229
230   Requested by: Dennis Stam ( Dennis dot Stam add sara dot nl )
231   Author: Bas van der Vlies
232
233 * More robust make/configure/setup.py
234   Reported by:
235        - Saidi, Yacine <saidi add linmpi dot mpg dot de>
236        - Shunjie Lau <eijnuhs add gmail dot com>
237   Author: Bas van der Vlies
238
239
240 * Only use the pbs_wrap.c and pbs.py 2.4 version for torque version 2.4.7 and higher.
241   Reported by: Saidi, Yacine <saidi add linmpi dot mpg dot de>
242   Author: Bas van der Vlies
243   
244=========== 4.0.2
245  * Quick fix so we do not get any undefined symbols. Forgot to
246    add the torque library when we compile the package.
247    Reported by: Shunjie Lau ( eijnuhs add gmail dot com)
248    Author: Bas van der Vlies
249
250=========== 4.0.1
251  * Fixed a bug in setting the right library path  for compiling.
252    Reported by: Chad Vizino ( vizino add psc dot edu )
253    Author: Bas van der Vlies
254   
255=========== 4.0.0
256  * pbs.py added some new functions for 2.4 version:
257    - pbs_fbserver(void);
258    - pbs_get_server_list(void);
259    - pbs_sigjobasync(int connect, char *job_id, char *signal, char *extend);
260    - pbs_alterjob_async(int connect, char *job_id, struct attrl *ATTRL, char *extend);
261    - pbs_checkpointjob(int connect, char *job_id, char *extend);
262    - log_ext(int,char *,char *,int);
263    - log_init(char *, char *);
264    - log_remove_old(char *,unsigned long);
265
266    Note: version 2.1.X is still supported
267
268  * autotools environment
269    - Added support for finding pbs-config (borrowed for mpiexec source)
270    - Detecting which version of torque is installed
271    - only support installations that have pbs-config installed.
272    - Removed old code for installations that do not a have pbs-config
273      installed.
274
275  * PBSQuery.py
276    - There was a bug in the new data interface (Resource_List for jobs)
277      Reported & Patch by: Mark Roberts ( mark at gingergeeks dot co dot uk)
278      Applied by with some minor changes: Bas van der Vlies
279
280    - The new data structure is the default. You can switch back to the old
281      one with:
282            p = PBSQuery()
283            p.old_data_structure()
284
285      Author: Bas van der Vlies
286
287   * examples/ha_server.py
288     An example how to use the High Availabilty torque functions
289     Author: Bas van der Vlies & Mark Roberts ( mark at gingergeeks dot co dot uk )
290
291=========== 3.6.0
292  * pbs, new generated pbs_wrap.c, pbs.py fixes a bug in pbs_runjob()
293    Reported by: Dennis Stam
294    Fixed by: Bas van der Vlies
295
296=========== 3.5.0
297  * PBSQuery
298        The class functions of node, job and queue support old and new data
299        structure.
300
301        Changed the behaviour of the new data stucture, We can use it as
302        dictionary and as class attribute, this is equivalent, eg:
303          - print node['np'] and print node.np
304
305        for a node we parse the 'status' line and split on '=' char, You now can
306        use these statements, eg
307          - print node.status.arch     (node['status'].arch or node['status']['arch'])
308          - print node.status.nsession
309
310        for a job we parse the 'Variable_List' line and split on '=' char, You now can
311        use the statements, eg:
312          - print job.Variable_List.PBS_O_WORKDIR
313          - print job.Variable_List.PBS_O_HOME
314
315        For more info see examples/new_interface.py
316
317    Author: Bas van der Vlies
318
319 * new_rack_pbsmon.py
320        Rewrite to new data structure and automatically determine how many nodes
321        and racks cluster has and skip printing of empty racks (default), use -w/--wide
322        for old behaviour.
323
324   Author: Bas van der Vlies
325
326
327=========== 3.2.0
328        - PBSQuery:
329          New data structure. In the old structure it is a dictionary
330          with a value and the value is a string. This is changed
331          that dictionary values are now of type list or dictionary depends
332          on the value of the keyword, eg for a node:
333            - np = 2:
334              * node['np'] = [ '2' ] 
335
336            - properties = cores2, mem4gb, parallel
337              * node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ]
338
339            - status = arch=x86_64,sessions=22599,,size=70627864kb, ...
340              * node['status']['arch'] = [ 'x86_64' ]
341              * node['status']['sessions'] = [ '222599' ]
342              * ...
343
344         The data structure is activated by the function:
345          * new_data_structure()
346
347        In a future release it will be come the default.
348        example:
349                p = PBSQuery()
350                p.new_data_structure()
351
352                nodes = p.getnodes()
353                print nodes.np, nodes['np']
354
355        Author: Bas van der Vlies
356
357        - PBSQuery
358          For old and new data structure we now can use another syntax:
359           * node['np'] and node.np are equivalent
360
361          This new syntax works for all keywords.
362
363        Author: Bas van der Vlies
364
365        - Added iter object for job, node, queue and server objects, eg:
366          node = p.getnode('gb-r1n1')
367          print node.name
368          for attrib in node:
369                print '%\t%s = %s' %(attrib, node[attrib])
370        Author: Bas van der Vlies
371
372        - fixed an error in getnode, getqueue and getjob, return empty
373          dictionary if not found
374        Author: Bas van der Vlies
375       
376        - New build system for rpm packages, make -f Makefile.rpm
377          Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr>
378
379        Applied: Bas van der Vlies
380
381=========== 3.0.1
382        - PBSQuery
383                * Removed a testing code line
384                Reported By: sam @ vpac dot org
385                Fixed by: Bas van der Vlies
386
387=========== 3.0.0
388        - PBSQuery
389                * Cleaned up some old lines of code which didn't do anything.
390                * Changed the returnvalue of getqueue, getnode and getjob. Now
391                  they return an instance of the object, instead of a dict.
392                  This is API change so we bumped the version to 3.0.0
393                * Now the getnode-function accepts the short name as well as
394                  the long name as an argument.
395
396                Author: Sil Westerveld <Sil.Westerveld@sara.nl>
397
398        - pbs.py, _pbs.so, PBSQuery.py
399                * Fixed a memory leak when used in daemon mode
400                Author: Bas van der Vlies <basv@sara.nl>
401
402=========== 2.9.8
403        - pbs_python.spec file patch added libdir and python defines so it
404          will build for RHEL5.1/CentOS 5.1
405          by        : Michael Sternberg <sternberg add anl dot gov>
406          applied by: Bas van der Vlies
407
408        - Updated the header files for pbs_python. So it can use some new
409          defines variables/defines, eg:
410                * ATTR_NODE_status
411                * ATTR_NODE_note
412                * ...
413          Added by: Dennis Stam <dennis.stam@sara.nl>, Bas van der Vlies
414
415        - Two new functions to log.h:
416                log_roll(int size);
417                log_size(void);
418          Added by: Bas van der Vlies
419
420        - We now have proper destructors (free memory) in SWIG for attrl and
421          attropl attributes.
422          Added by: Bas van der Vlies
423
424        - PBSQuery
425                * Added getnodes_with_property() function. This will get all nodes with
426                  a certain property, eg:
427                   - get all nodes with property 'cores8' and return all attributes:
428                      getnodes_with_property('cores8')
429               
430                   - get all nodes with property 'cores2' and only return the
431                     attributes 'state' and 'properties':
432                      attrl = [ 'state', 'properties' ]
433                      getnodes_with_property('cores2', attrl)
434               
435                     Only for torque version > 2.1.0
436             
437                Added by: Bas van der Vlies
438
439                * Added to class node the function
440                 - get_jobs(self, unique=None)
441                   Returns a list of the currently running job-id('s) on the node.
442                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
443
444                * Added get_server_name() function.
445                  This will return the PBS-server's name.
446                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
447
448                * Added to class _PBSobject the function
449                  - uniq(self, list)
450                    Filters out unique items of a list.
451                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
452
453                * Added to class job the function
454                  - get_nodes(self, unique=None)
455                    Returns a list of the nodes which run the job.
456                Added by: Sil Westerveld <Sil.Westerveld@sara.nl>
457
458=========== Version 2.9.4
459        -  Function pbs.pbs_geterrmsg does not exits any more is
460           replaced by pbs.error():
461                errno, text = pbs.error()
462                print errno, text
463           Reported by: pk at q-leap dot com
464           Fixed by   : Bas van der Vlies
465
466        - PBSQuery.py
467           * Added get_version() for server class, returns the version of
468             the batch server
469             Added by    : Bas van der Vlies
470
471           * Added get_nodes() for job class, returns a list of nodes on
472             which the job is run
473             Added by    : Bas van der Vlies
474
475           * PBSQuery.py rewrite make use of UserDict module.
476             Suggested by: Ramon Bastiaans
477             Fixed by    : Bas van der Vlies
478
479=========== Version 2.9.2
480        - The function pbs_rescquery() did not work. Fixed it
481        - The function avail(), did not work fixed it
482        - The functions pbs_rescreserve and pbs_rescrelease did not work
483          fixed it
484
485        - Fixed a bug in new_rack_pbsmon.py. Counting of serial
486          nodes was wrong and state down has topmost priority
487
488=========== Version 2.9.0
489        - Added support for new torque build system 2.1.0
490        - Added new_rack_pbsmon.py
491          Authors: Walter de Jong & Bas van der Vlies
492
493=========== Version 2.8.2
494
495Configure has a new option:
496        --with-pbsdir=PATH
497
498If set it will use PATH specified as argument to
499find the pbs/torque libraries. If unset it will use
500some useful defaults to find the libaries.
501Suggested by: Troy Baer
502
503PBSQuery.py:
504        - If we can not make a connection with the server
505          then raise an exception and let the programmer
506          decides what to do.
507
508pbs_python.spec:
509        - It can now handle mode bits
510          Author: Martin Pels from SARA
511       
512=========== Version 2.8.0
513
514setup.py:
515        - Added /usr/lib to PBS_LIB_DIR
516
517pbs.py:
518        - Added new function "pbs.error()". This function checks if
519          an error has occured with a pbs function, eg:
520            task_id = pbs.pbs_submit(c, attrl, "A.tsk", 'NULL', 'NULL')
521            error_number, err_txt = pbs.error()
522            if error_number:
523                print error_number, err_txt
524
525          prints the following message if script A.tsk does not exists:
526            15042 (qsub) cannot access script file
527
528pbs_python.spec:
529        - to make rpm packages from the source package, initial version
530        Author: Martin Pels from SARA
531
532README:
533        - Now requires python 2.1 and higher
534        - Explain how to build DEBIAN package
535
536=========== Version 2.7.10
537
538PBSQuery.py:
539        Fixed an error. You always got all resources from eg nodes
540        even when you supplied an attribute list where you only
541        requested the 'state' of the node.
542
543        Updated the inline python documentation
544
545=========== Version 2.7.9
546
547Fixed an error the previous version was in DEBUG mode. So
548you get an lot undesired output on the screen.
549
550debian package now also generated a package with the write
551version info.
552
553=========== Version 2.7.8
554
555Setup.py:
556        Can also handle ROCKS installations + the version
557        info is now the same as pbs.py
558        Thanks to: Roy Dragseth
559
560=========== Version 2.7.7
561
562PBSQuery module:
563  It can now be used in daemon programs. The pbs_server closes
564  the connection after an certain amount of time. This is fixed,
565  before every query there is an new connection and if the query
566  is finished the connection is closed.
567 
568=========== Version 2.7.6
569
570Now setup.py can also handle old Oscar Installations.
571Thanks To: Robin Humble
572
573Fixed an print statement fix in new_interface.py:
574Thanks To: Robin Humble
575
576Made some improvements for PBSQuery module:
577        - Updated the documentation
578        - Added the has_key() function to all
579          PBSObjects. So that the behaviour is similar to
580          an dictionary
581          Suggested By: Ramon Bastiaans
582       
583=========== Version 2.7.5
584 Added PBSQuery module.  This module requires pbs.py and it a simple module
585 for querying the pbs server. The documentation is in the module. Use for
586 example ipython to read it.
587
588 Written By: Roy Dragseth
589             Bas van der Vlies
590
591 eg: ( see also examples/new_interface.py)
592
593 from PBSQuery import PBSQuery
594 p = PBSQuery()
595
596 jobs = p.getjobs()
597 for name, job in jobs.items()
598        print job
599
600=========== Version 2.7.4
601 New versions fixes an bug in function pbs.pbs_statnode().
602 Reported by: Keith Poirier
603
604 Configure support:
605 Contributed By: Yaroslav Halchenko
606
607 Debian package support:
608 Contributed By: Yaroslav Halchenko
609
610 Added Support for Debuging the interface, You must edit pbs_wrap.c
611 and search for SARA_DEBUG:
612        #define SARA_DEBUG 1
613 Implemented by: Ramon Bastiaans
614
615 examples/pbsmon.py:
616        - Fixed an error when regex fails to determine node number,
617          no status was displayed
618        - It will now display and 'j' if the node is free for the batch
619          system and a job runs on the node (SMP-systems).
620 Changed by: Bas van der Vlies
621
622 examples/rack_pbsmon.py:
623        - An pbsmon that display node info per rack
624        - Edit the rack_pbsmon.py to adjust the values. It requires
625          that hostname contains rack and node id's,
626          eg: gb-r<number>n<number>
627 Contributed by: Walter de Jong
628
629=========== Version 2.7.3
630 The name SPBS is changed to the new name TORQUE (Tera-scale Open-source
631 Resource and QUEing manager).
632
633 The interface support OPENPBS and TORQUE.
634
635=========== Version 2.7.2
636 Some minor changes to include files. Now the Scalable PBS keywords
637 are also supported ( server attribute names: node_ping_rate and
638 node_check_rate). This does not interfere with the openpbs software.
639
640 pbsmon.py could not handle an one node cluster. Fixed it.
641
642=========== Version 2.7
643 Forgot to wrap the pbs_statfree() function. So we could not free
644 allocated memory from functions that return 'struct batch_status *'
645 like pbs_statjob().
646
647 pbsmon.py can now handle 2 and 3 digit hostnames. Patch supplied by
648 Daniel Olson
649
650=========== Version 2.6.1
651 Setup.py now checks if all openpbs libraries are installed to compile the
652 package.
653
654=========== Version 2.6
655
656 Fixed a bug in the pbs python module. Forgot to map the pbs_statjob()
657 function. This bug prevented to pass 'struct attrl' variables to this
658 function. Thanks to Evelyn Shiu for reporting this bug.
659
660
661=========== Version 2.5
662 Added the OpenPbs logging functions (log.h and liblog.a). There
663 is an example in the examples directory: logpbs.py
664
665 Fixed a bug in examples/resmom_info.py used the default port for
666 pbs_resmon if getservbyname fails.
667
668 Fixed a bug in resmom code. If the user has no permissions to query
669 the pbs_mom daemon a empty string is returned. Now we check for
670 the empty string. So we do not get a python exception.
671
672 Fixed a bug in setup.py forgot the exit statement when we did not
673 find the pbs libraries.
674
675=========== Version 2.3
676 Bugfix in the pbsnodes-a.py. Forgot to import the sys module.
677
678 Removed some obsolete code.
679
680 As for now we make use of the distutils module. So the package
681 is automatically compiled and installed in proper directories, usage:
682    python setup.py install
683 This requires that the package 'distutils' must be installed. As for
684 version 1.6 and higher it is in the distribution.
685
686 Added a function that prints the pbs python interface version. So we
687 can check if we have the right interface version:
688 import pbs
689 print pbs.version()
690 
691
692=========== Version 2.2
693
694In this release we can query the pbs_mom daemon with the aid of
695resource management functions:
696   pbs.openrm()
697   pbs.closerm()
698   pbs.downrm()
699   pbs.configrm()
700   pbs.addreq()
701   pbs.allreq()
702   pbs.flushreq()
703   pbs.activereq()
704   pbs.fullresp()
705   pbs.getreq()
706
707There is also a python function:
708   pbs.get_mom_values(id, [list]):
709     id   - connection id of pbs.openrm(node-name, port-number)
710     list - Is a optional paramter. A list of resource keywords
711
712   If 'list' is not supplied then this function will get the values
713   for the standard resource keywords, eg uname, loadave, .. + 'arch'
714   depended keywords. The arch feature is only implemented for linux,
715   but it can easily be ported to other oses.
716
717   if 'list' is supplied then we only fetch values for the keywords
718   that are in the list.
719
720   The function returns a dictonary. The keys are the resource keywords.
721
722   See 'resmom_info.py' for a example of this new feature.
723
724=========== Version 2.0
725
726The previous version was a simple interface above the PBS C API LIB.  This
727interface has gone a major changes. The most noticeable change is  that
728the functions accept/return Python lists instead of C-lists.  So you can now
729use standard Python syntax for manipulating Python lists. If you are familar
730with the Python syntax then you will appreciate this new interface.
731
732NOTE:
733  This interface is NOT compatible with the old one
734
735Here are some guidelines to convert your code to the new one:
736
737The constructors for the struct has gone a major change:
738  old code:
739    temp = pbs.new_attrl();
740    attrl_p = pbs.attrlPtr(temp)
741    attrl_p.name = 'state'
742
743  new_code:
744     attr_l = pbs.new_attrl(1)   // Creates a list of attrl structs length 1
745     attr_l[0].name = 'state'
746
747
748The pbs_stat functions returns Python lists instead of C-lists. There is
749NO next field anymore:
750  old_code:
751    temp = pbs.new_attrl();
752    attrl_p = pbs.attrlPtr(temp)
753    attrl_p.this = 'NULL'
754
755    nodes = pbs.pbs_statnode(con, "", attrl_p, "NULL")
756
757    while nodes.this != 'NULL':
758      print nodes.name
759
760      node_attrl = nodes.attribs
761      while node_attrl.this != 'NULL':
762        print '\t', node_attrl.name, '=', node_attrl.value
763        node_attrl = node_attrl.next
764
765    nodes = nodes.next
766
767
768  new_code:
769    nodes = pbs.pbs_statnode(con, "", "NULL", "NULL")
770    for node in nodes:
771      print node.name
772      for attrib in node.attribs:
773        print '\t', attrib.name, '=', attrib.value
774
775Another advantage is you can use the print statement to show the
776connect of attrl and attropl classes:
777   attr_l = pbs.new_attrl(2)
778   attr_l[0].name = 'bas'
779   attr_l[0].value = 'van der Vlies'
780
781   print  attr_l[0]
782   >> (bas,,van der Vlies)
783   
784I hope these examples illustrate the changes. If you specify a wrong type
785for a function then function wil raise a Python exception.
Note: See TracBrowser for help on using the repository browser.