wiki:TorqueUsage/Functions/Usepool

Version 2 (modified by anonymous, 18 years ago) (diff)

--

USEPOOL

returns the number of nodes currently in use, the sum of allocated, reserved, and down.

number = pbs.usepool(c, update)

In

c::

Connection id

update::

If update is non-zero causes totpool() to issue a pbs_rescquery() call to obtain fresh information. If zero, numbers from the prior pbs_rescquery() are used.

Out

number::

Total number of nodes

Example

#!/usr/bin/env python

c = pbs.pbs_connect(pbs.pbs_default())

number = pbs.usepool(c, 1)
print number