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 han‐
28 dles the linked lists for you. See the scripts in the demos directory.
29
31 Perl wrapper extension for the PBS libraries (as from OpenPBS or
32 Torque). This allows you to stat jobs, stat nodes, submit jobs, alter
33 jobs, etc. all directly from Perl. Specifally, the "ifl", "rpp", and
34 "rm" interfaces are supported; but the "rpp" interface is untested.
35 Support for the "tm" API may come in a future version.
36
37 struct attrl
38
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
59 Implemented exactly like "struct attrl" above.
60
61 struct batch_state
62
63 Several functions return a linked list of "struct batch_status". In
64 its place, this module returns a reference to an array. The array is a
65 list of hash refs of "attrl" structures. The "attribs" value points to
66 another array refs. The easiest way to demostrate this is to look at
67 the sample code in the demos directory, or use Data::Dumper.
68
69 The name and resource members in the attrl list are munged together in
70 the same fashion.
71
73 None by default.
74
75 To get a list of export tags, type:
76 perl -MPBS -MData::Dumper -e 'print Dumper(\%PBS::EXPORT_TAGS)'
77
78 At the time of this writing, this includes:
79
80 monitor => [qw[pbs_connect pbs_default pbs_statjob pbs_disconnect
81 pbs_statque pbs_statserver pbs_statnode]],
82 manager => [qw[pbs_deljob pbs_geterrmsg pbs_holdjob pbs_locjob
83 pbs_manager pbs_movejob pbs_msgjob pbs_orderjob
84 pbs_rerunjob pbs_rlsjob pbs_runjob pbs_selectjob
85 pbs_sigjob pbs_submit pbs_terminate]],
86 resc => [qw[pbs_rescquery pbs_rescreserve pbs_rescrelease
87 totpool usepool]],
88 rm => [qw[openrm closerm downrm configrm addreq allreq
89 getreq flushreq activereq fullresp]],
90 rpp => [qw[rpp_open rpp_bind rpp_poll rpp_io rpp_read rpp_write
91 rpp_close rpp_getaddr rpp_flush rpp_shutdown rpp_terminate
92 rpp_rcommit rpp_wcommit rpp_skip rpp_eom rpp_getc rpp_putc
93 netaddr crc rpp_fd rpp_dbprt ]],
94
95 All symbols inside EXPORT_TAGS are also in EXPORT_OK.
96
98 The entire API is not yet implemented and/or documented.
99
101 See pbs_ifl.h for a list of functions, structs, and constants. All PBS
102 manpages. "PBS::rm(3pm)", "PBS::rpp(3pm)"
103
105 Garrick Staples, <garrick@usc.edu>
106
108 Copyright 2004, 2005, 2006 by Garrick Staples
109
110 This library is free software; you can redistribute it and/or modify it
111 under the same terms as Perl itself.
112
113
114
115perl v5.8.8 2004-10-10 PBS(3)