1PBS(3) User Contributed Perl Documentation PBS(3)
2
3
4
6 PBS - Perl extension for PBS
7
9 use PBS;
10
11 my $con=PBS::pbs_connect("");
12 my $status=PBS::pbs_statnode($con, undef, [qw/state np ntype status/], undef);
13
14 foreach (@{$status}) {
15 print $_->{name}, "\n";
16 foreach (@{$_->{attribs}}) {
17 print " ",$_->{name},
18 $_->{resource} ? (".", $_->{resource}) : "",
19 " = ",$_->{value}, "\n";
20 }
21 print "\n";
22 }
23 PBS::pbs_disconnect($con);
24
26 Perl wrapper extension for the PBS libraries. The API is almost
27 exactly the same as the original C API, except that this modules
28 handles the linked lists for you. See the scripts in the demos
29 directory.
30
32 Perl wrapper extension for the PBS libraries (as from OpenPBS or
33 Torque). This allows you to stat jobs, stat nodes, submit jobs, alter
34 jobs, etc. all directly from Perl. Specifally, the "ifl", "rpp", and
35 "rm" interfaces are supported; but the "rpp" interface is untested.
36 Support for the "tm" API may come in a future version.
37
38 struct attrl
39 Several functions in the C API accept a linked list of "struct attrl".
40 In its place, this module allows you to instead pass a simple scalar, a
41 reference to an array, or a reference to a hash. If you pass a simple
42 scalar, it is interpreted as a single "name" in the struct. If you
43 pass in an array ref, it is interpreted as a list of "name" in the
44 linked list. If you pass a hash ref, it is interpreted as a list of
45 "name" and "value" in the list. If any "name" contains a ".", it is
46 split as a "name" and "resource" (similar to the output of "qstat -f").
47 For example, the following should demonstrate:
48
49 $attrl="job_state"; # passes a single struct
50
51 # passes two structs, the second has "resource" set to "nodect"
52 @attrl=qw/job_state Resource_List.nodect";
53
54 # passes two structs, the second has a value
55 %attrl = ( jobs_state => "", Resource_List.walltime => "100:00:00";
56
57 struct attrlop
58 Implemented exactly like "struct attrl" above.
59
60 struct batch_state
61 Several functions return a linked list of "struct batch_status". In
62 its place, this module returns a reference to an array. The array is a
63 list of hash refs of "attrl" structures. The "attribs" value points to
64 another array refs. The easiest way to demostrate this is to look at
65 the sample code in the demos directory, or use Data::Dumper.
66
67 The name and resource members in the attrl list are munged together in
68 the same fashion.
69
71 None by default.
72
73 To get a list of export tags, type:
74 perl -MPBS -MData::Dumper -e 'print Dumper(\%PBS::EXPORT_TAGS)'
75
76 At the time of this writing, this includes:
77
78 monitor => [qw[pbs_connect pbs_default pbs_statjob pbs_disconnect
79 pbs_statque pbs_statserver pbs_statnode]],
80 manager => [qw[pbs_deljob pbs_geterrmsg pbs_holdjob pbs_locjob
81 pbs_manager pbs_movejob pbs_msgjob pbs_orderjob
82 pbs_rerunjob pbs_rlsjob pbs_runjob pbs_selectjob
83 pbs_sigjob pbs_submit pbs_terminate]],
84 resc => [qw[pbs_rescquery pbs_rescreserve pbs_rescrelease
85 totpool usepool]],
86 rm => [qw[openrm closerm downrm configrm addreq allreq
87 getreq flushreq activereq fullresp]],
88 rpp => [qw[rpp_open rpp_bind rpp_poll rpp_io rpp_read rpp_write
89 rpp_close rpp_getaddr rpp_flush rpp_shutdown rpp_terminate
90 rpp_rcommit rpp_wcommit rpp_skip rpp_eom rpp_getc rpp_putc
91 netaddr crc rpp_fd rpp_dbprt ]],
92
93 All symbols inside EXPORT_TAGS are also in EXPORT_OK.
94
96 The entire API is not yet implemented and/or documented.
97
99 See pbs_ifl.h for a list of functions, structs, and constants. All PBS
100 manpages. "PBS::rm(3pm)", "PBS::rpp(3pm)"
101
103 Garrick Staples, <garrick@usc.edu>
104
106 Copyright 2004, 2005, 2006 by Garrick Staples
107
108 This library is free software; you can redistribute it and/or modify it
109 under the same terms as Perl itself.
110
111
112
113perl v5.12.1 2007-05-24 PBS(3)