NAME
Slurm::Sacctmgr::Association
SYNOPSIS
use Slurm::Sacctmgr::Association;
use Slurm::Sacctmgr;
my $sacctmgr = new Slurm::Sacctmgr;
my $list = Slurm::Sacctmgr::Association->sacctmgr_list($sacctmgr);
#List all associations known to sacctmgr
foreach $association (@$list)
{ #association is a Slurm::Sacctmgr::Association object
$uname = $association->user;
$cluster = $association->cluster;
$partition = $association->partition;
$cpumins = $association->grpcpumins;
print "$uname $cluster $partition $cpumins\n";
}
...
DESCRIPTION
Represents a Association entity in Slurm::Sacctmgr. Together with an instance of Slurm::Sacctmgr, this class allows one to issue commands to the Slurm sacctmgr command list or show entities of type "association".
The Slurm::Sacctmgr class provides a Perlish wrapper around the actual Slurm sacctmgr command, thus the methods provided by this class largely map quite straightforwardly onto sacctmgr commands. When using the sacctmgr_list method for this class, the results from the sacctmgr command is automatically parsed and presented as objects of this class.
Objects of this class contain the following data members:
- account: the account for the association
- cluster: the cluster for the association
- user: the user for the association
- partition: the partition for the association
- defaultqos: the default QoS for this association
- grpcpumins: the total number of CPU minutes usable by jobs with this association
- grpcpus: the maximum number of CPUs running jobs in this association can have allocated
- grpjobs: the maximum number of running jobs this association can have
- grpnodes: the maximum number of nodes jobs running in this association can have allocated
- grpsubmitjobs: the maximum number of jobs (pending or running) the association can have at a time
- grpwall: the maximum wall clock time jobs running in the association can have
- id: the id number for this association
- lft, rgt: index numbers, all children of this association will have an lft between this lft and rgt
- maxcpumins: the maximum number of CPU minutes each job in this association can use
- maxcpus: the maximum number of CPUs each job in this association can use
- maxjobs: the maximum number of jobs each user in this association can run at one time
- maxsubmitjobs: the maximum number of jobs (pending or running) each user in this association can have at a given time
- maxwall: the maximum wall clock time each job in this association can use
- parentid: the id number of the parent of this association
- parent: the name of the parent of this association
- qos: the QoSes that jobs in this association can use
and these are the fields that will be set by the sacctmgr_list and similar methods. When filtering results, you can use any fields recognized by the sacctmgr command.
Most functionality is provided via the base classes,
As a result, the whole Slurm::Sacctmgr::* family (for different entity types) all have a very similar association interface (basically the differences are what operations sacctmgr allows on different entity types, and how the results of list/show operations get parsed).
Sacctmgr does NOT allow the direct addition, deletion and/or modification of associations --- instead you should add, delete, or modify the user or account, etc. entities to which the associations attach.
As such, the only real method provided by this package is sacctmgr_list($sacctmgr, %where). This will return a list reference of all associations matching the "where" clause. The "where" clause is a list of zero or more key => value pairs specifying the conditions. Only exact matching is supported, and keys cannot be usefully repeated (the "where" clause is treated as a hash, so later keys simply overwrite earlier keys). You can use any parameter the Slurm sacctmgr command allows you to filter on. If no key => value pairs are given, all entities of this type are returned.
EXPORT
Nothing. Pure OO interface.
SEE ALSO
AUTHOR
Tom Payerle, payerle@umd.edu
COPYRIGHT AND LICENSE
Copyright (C) 2014-2016 by the University of Maryland.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.