Last change
on this file since 329 was
286,
checked in by bas, 11 years ago
|
PBSacct framework for accounting records, beta
list some changes
|
-
Property svn:keywords set to
Id
|
File size:
589 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # Author: Bas van der Vlies <basv@sara.nl> |
---|
3 | # Date : 17 Aug 2001 |
---|
4 | # Desc. : print version of pbs_server |
---|
5 | # |
---|
6 | # CVS info: |
---|
7 | # $Id: pbs_version.py 286 2012-12-20 11:01:00Z bas $ |
---|
8 | # |
---|
9 | # |
---|
10 | import sys |
---|
11 | import pbs |
---|
12 | |
---|
13 | def main(): |
---|
14 | |
---|
15 | pbs_server = pbs.pbs_default() |
---|
16 | if not pbs_server: |
---|
17 | print 'No default server' |
---|
18 | sys.exit(1) |
---|
19 | |
---|
20 | con = pbs.pbs_connect(pbs_server) |
---|
21 | |
---|
22 | attr_l = pbs.new_attrl(1) |
---|
23 | attr_l[0].name = 'pbs_version' |
---|
24 | |
---|
25 | server_info = pbs.pbs_statserver(con, attr_l, 'NULL') |
---|
26 | for entry in server_info: |
---|
27 | print entry.name |
---|
28 | for attrib in entry.attribs: |
---|
29 | print '\t', attrib.name, ' = ', attrib.value |
---|
30 | |
---|
31 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.