Commands - mshow -a (Available Resources)
Moab Workload Manager®

mshow -a

(Moab Show Available Resources)

Synopsis

mshow -a availableresources [-i] [-o] [-p package] [-T] [-w where] [-x] [--xml]

Overview

The mshow -a command allows for querying of available system resources

Arguments

[-a]
    
AVAILABLE_RESOURCES
[-i]
    
INTERSECTION
[-o]
    
NO AGGREGATE
[-p]
   
PROFILE
[-T]
  
TIMELOCK
[-w]
    
WHERE
[-x]
    
EXCLUSIVE


Table 1:  Argument Format
Flag Name Format Description Example
--flags Flags --flags=[ future | policy | tid | summary | verbose ]
future will return resources available immediately and available in the future
policy will apply charging policies to determine the total cost of each reported solution (NOTE: only enabled for XML responses)
summary will assign all jointly allocated transactions as dependencies of the first transaction reported
tid will associate a transaction id with the reported results
verbose will return diagnostic information and response hostlists
mshow --flags
> mshow -a -w user=john --flags=tid --xml
show resources available to john in XML format with a transaction id
--xml XML --xml
report results in XML format
mshow --xml
> mshow -a -w user=john --flags=tid --xml
show resources available to john in XML format with a transaction id
-a AVAILABLE
RESOURCES
--- Display available resources
mshow -a
> mshow -a -w user=john --flags=tid --xml
show resources available to john in XML format with a transaction id
-i INTERSECTION --- Specifies that an intersection should be performed during an mshow -a command with multiple requirements  
-o NO AGGREGATE --- Specifies that the results of the command mshow -a with multiple requirements should not be aggregated together  
-p PROFILE <VPCPROFILEID> Specifies which virtual private cluster profile should be used to adjust the explicit constraints of the request  
-T TIMELOCK --- Specifies that the multiple requirements of an mshow -a command should be timelocked
mshow -T
> mshow -a -w minprocs=1,os=linux,duration=1:00:00 \
 -w minprocs=1,os=aix,duration=10:00 \
 --flags=tid,future -x -T
-w WHERE <ATTR>=<VAL> [,<ATTR>=<VAL>]...
 
Attributes are listed below in table 2
Add a "Where" clause to the current command. (Currently supports up to 6 co-allocation clauses)
mshow -w
> mshow -a -w minprocs=2,duration=1:00:00 -w nodemem=512,duration=1:00:00
-x EXCLUSIVE --- Specifies that the multiple requirements of an mshow -a command should be exclusive (ie. each node may only be allocated to a single requirement)
mshow -x
> mshow -a -w minprocs=1,os=linux -w minprocs=1,os=aix --flags=tid -x

 
Table 2:  Request Attributes
Name Description
account the account credential of the requestor
arch select only nodes with the specified architecture
cal select resources subject to the constraints of the specified global calendar
class the class credential of the requestor
coalloc the co-allocation group of the specific Where request (can be any string but must match co-allocation group of at least one other Where' request)
NOTE: the number of tasks requested in each Where request must be equal whether this taskcount is specified via minprocs, mintasks, or gres.
count the number of profiles to apply to the resource request
displaymode constrain how results will be presented
duration the duration for which the resources will be required in format [[[DD:]HH:]MM:]SS
gres select only nodes which possess the specified generic resource
group the group credential of the requestor
hostlist select only the specified resources
job use the resource, duration, and credential information for the job specified as a resource request template
jobfeature select only resources which would allow access to jobs with the specified job features
jobflags select only resources which would allow access to jobs with the specified job flags
label associate the specified label with all results matching this request
minnodes return only results with at least the number of nodes specified.  If used with TID's, return only solutions with exactly minnodes nodes available
minprocs return only results with at least the number of processors specified.  If used with TID's, return only solutions with exactly minprocs processors available
mintasks FORMAT: <TASKCOUNT>[@<RESTYPE>:<COUNT>[+<RESTYPE>:<COUNT>]...] where <RESTYPE> is one of procs, mem, disk, or swap.   Return only results with at least the number of tasks specified.  If used with TID's, return only solutions with exactly mintasks available
nodedisk select only nodes with at least nodedisk MB of local disk configured
nodefeature select only nodes with all specified features present using format <feature>[:<feature>]...
nodemem select only nodes with at least nodemem MB of memory configured
offset select only resources which can be co-allocated with the specified time offset where offset is specified in the format [[[DD:]HH:]MM:]SS
os select only nodes with have, or can be provisioned to have, the specified operating system
partition the partition in which the resources must be located
policylevel enable policy enforcement at the specified policy constraint level
qos the qos credential of the requestor
rsvprofile use the specified profile if committing a resulting transaction id directly to a reservation
starttime constrain the timeframe for the returned results by specifying one or more ranges using the format <STIME>[-<ENDTIME>][;<STIME>[-<ENDTIME>]] where each time is specified in the format in absolute, relative, or epoch time format ([HH[:MM[:SS]]][_MO[/DD[/YY]]] or +[[[DD:]HH:]MM:]SS or <EPOCHTIME>).  NOTE: The starttime specified is not the exact time at which the returned range must start, but is rather the earliest possible time the range may start.
taskmem require taskmem MB of memory per task located
tpn require exactly tpn tasks per node on all discovered resources
user the user credential of the requestor
var use associated variables in generating per transaction charging quotes

Usage Notes

   The mshow -a command allows for querying of available system resources.  When combined with the --flags=tid option these available resources can then be placed into a "packaged" reservation (using mrsvctl -c -R) or vpc (using mschedctl -c vpc -R).  This allows system administrators to grab and reserve available resources for whatever reason, without conflicting with jobs or reservations that may holding certain resources.

   There are a few restrictions on which <ATTR> from the -w command can be placed in the same req: minprocs, minnodes, and gres are all mutually exclusive, only one may be used per -w request.

   The allocation of available nodes will follow the global NODEALLOCATIONPOLICY.

   When the '-o' flag is not used, multi-request results will be aggregated.  This aggregation will negate the use of offsets and request-specific starttimes.

   The config parameter RESOURCEQUERYDEPTH controls the maximum number of options that will be returned in response to a resource query.

Example 1: Basic Compute Node Query and Reservation

mshow -a
> mshow -a -w duration=10:00:00,minprocs=1,os=AIX53,jobfeature=shared --flags=tid,future

Partition     Tasks  Nodes      Duration   StartOffset       StartDate
---------     -----  -----  ------------  ------------  --------------
ALL               1      1      10:00:00      00:00:00  13:28:09_04/27  TID=4  ReqID=0
ALL               1      1      10:00:00      10:00:00  17:14:48_04/28  TID=5  ReqID=0
ALL               1      1      10:00:00      20:00:00  21:01:27_04/29  TID=6  ReqID=0

> mrsvctl -c -R 4

NOTE:  reservation system.2 created

Example 2: Mixed Processor and License Query

   Select one node with 4 processors and 1 matlab license where the matlab license is only available for the last hour of the reservation.  Also, select 16 additional processors which are available during the same timeframe but which can be located anywhere in the cluster.  Group the resulting transactions together using transaction dependencies so only the first transaction needs to be committed to reserve all associated resources.

mshow -a
> mshow -a -i -o -x -w mintasks=1@PROCS:4,duration=10:00:00,coalloc=a \
                    -w gres=matlab,offset=9:00:00,duration=1:00:00,coalloc=a \
                    -w minprocs=16,duration=10:00:00 --flags=tid,future,summary

Partition     Tasks  Nodes      Duration   StartOffset       StartDate
---------     -----  -----  ------------  ------------  --------------
ALL               1      1      10:00:00      00:00:00  13:28:09_04/27  TID=4  ReqID=0
ALL               1      1      10:00:00      10:00:00  17:14:48_04/28  TID=5  ReqID=0
ALL               1      1      10:00:00      20:00:00  21:01:27_04/29  TID=6  ReqID=0

> mrsvctl -c -R 4


NOTE:  reservation system.2 created
NOTE:  reservation system.3 created
NOTE:  reservation system.4 created

Example 3: Request for Generic Resources

   Query for a generic resource on a specific host (no processors, only a generic resource).

mshow -a
> mshow -a -i -x -o -w gres=dvd,duration=10:00,hostlist=node03 --flags=tid,future

Partition     Tasks  Nodes   StartOffset      Duration       StartDate
---------     -----  -----  ------------  ------------  --------------
ALL               1      1      00:00:00      00:10:00  11:33:25_07/27  TID=16  ReqID=0
ALL               1      1      00:10:00      00:10:00  11:43:25_07/27  TID=17  ReqID=0
ALL               1      1      00:20:00      00:10:00  11:53:25_07/27  TID=18  ReqID=0

> mrsvctl -c -R 16

NOTE:  reservation system.6 created

> mdiag -r system.6
Diagnosing Reservations
RsvID                      Type Par   StartTime     EndTime     Duration Node Task Proc
-----                      ---- ---   ---------     -------     -------- ---- ---- ----
system.6                   User loc   -00:01:02    00:08:35     00:09:37    1    1    0
    Flags: ISCLOSED
    ACL:   RSV==system.6=
    CL:    RSV==system.6
    Accounting Creds:  User:test
    Task Resources: dvd: 1
    Attributes (HostExp='^node03$')
    Rsv-Group: system.6

Example 4: Allocation of Shared Resources

   This example walks through a relatively complicated example in which a set of resources can be reserved to be allocated for shared requests.  In the example below, the first mshow query looks for resources within an existing shared reservation.  In the example, this first query fails because there is now existing reservation.  The second mshow requests asks for resources outside of a shared reservation and finds the desired resources.  These resources are then reserved as a shared pool.  The third mshow request again asks for resources inside of a shared reservation and this time finds the desired resources.

mshow -a
> mshow -a -w duration=10:00:00,minprocs=1,os=AIX53,jobflags=ADVRES,jobfeature=shared --flags=tid

Partition     Tasks  Nodes      Duration   StartOffset       StartDate
---------     -----  -----  ------------  ------------  --------------

> mshow -a -w duration=100:00:00,minprocs=1,os=AIX53,jobfeature=shared --flags=tid

Partition     Tasks  Nodes      Duration   StartOffset       StartDate
---------     -----  -----  ------------  ------------  --------------
ALL               1      1     100:00:00      00:00:00  13:20:23_04/27  TID=1  ReqID=0

> mrsvctl -c -R 1

NOTE:  reservation system.1 created

> mshow -a -w duration=10:00:00,minprocs=1,os=AIX53,jobflags=ADVRES,jobfeature=shared --flags=tid

Partition     Tasks  Nodes      Duration   StartOffset       StartDate
---------     -----  -----  ------------  ------------  --------------
ALL               1      1      10:00:00      00:00:00  13:20:36_04/27  TID=2  ReqID=0

> mrsvctl -c -R 2

NOTE:  reservation system.2 created

Example 5: Full Resource Query in XML Format

   The following command will report information on all available resources which meet at least the minimum specified processor and walltime constraints and which are available to the specified user.  The results will be reported in XML to allow for easy system processing.

mshow -a
> mshow -a -w class=grid,minprocs=8,duration=20:00 --format=xml --flags=future,verbose

<Data>
  <Object>cluster</Object>
  <job User="john" time="1162407604"></job>
  <par Name="template">
    <range duration="Duration" nodecount="Nodes" proccount="Procs" starttime="StartTime"></range>
    </par>
  <par Name="ALL" feasibleNodeCount="131" feasibleTaskCount="163">
    <range duration="1200" hostlist="opt-001:1,opt-024:1,opt-025:1,opt-027:2,opt-041:1,opt-042:1,x86-001:1,P690-001:1,P690-021:1,P690-022:1" 
        index="0" nodecount="10" proccount="8" reqid="0" starttime="1162407604"></range>
    <range duration="1200" hostlist="opt-001:1,opt-024:1,opt-025:1,opt-027:2,opt-039:1,opt-041:1,opt-042:1,x86-001:1,P690-001:1,P690-021:1,P690-022:1" 
        index="0" nodecount="11" proccount="8"reqid="0" starttime="1162411204"></range>
    <range duration="1200" hostlist="opt-001:1,opt-024:1,opt-025:1,opt-027:2,opt-039:1,opt-041:1,opt-042:1,x86-001:1,x86-002:1,x86-004:1,
        x86-006:1,x86-013:1,x86-014:1,x86-015:1,x86-016:1,x86-037:1,P690-001:1,P690-021:1,P690-022:1" 
        index="0" nodecount="19" proccount="8" reqid="0" starttime="1162425519"></range>
    </par>
  <par Name="SharedMem">
    <range duration="1200" hostlist="P690-001:1,P690-002:1,P690-003:1,P690-004:1,P690-005:1,P690-006:1,P690-007:1,P690-008:1,P690-009:1,
        P690-010:1,P690-011:1,P690-012:1,P690-013:1,P690-014:1,P690-015:1,P690-016:1,P690-017:1,P690-018:1,P690-019:1,P690-020:1,P690-021:1,
        P690-022:1,P690-023:1,P690-024:1,P690-025:1,P690-026:1,P690-027:1,P690-028:1,P690-029:1,P690-030:1,P690-031:1,P690-032:1" 
        index="0" nodecount="32" proccount="8" reqid="0" starttime="1163122507"></range>
    </par>
  <par Name="64Bit">
    <range duration="1200" hostlist="opt-001:1,opt-024:1,opt-025:1,opt-027:2,opt-039:1,opt-041:1,opt-042:1" 
        index="0" nodecount="7" proccount="8" reqid="0" starttime="1162411204"></range>
    <range duration="1200" hostlist="opt-001:1,opt-024:1,opt-025:1,opt-027:2,opt-039:1,opt-041:1,opt-042:1,opt-043:1,opt-044:1,opt-045:1,
        opt-046:1,opt-047:1,opt-048:1,opt-049:1,opt-050:1" 
        index="0" nodecount="15" proccount="8" reqid="0" starttime="1162428996"></range>
    <range duration="1200" hostlist="opt-001:1,opt-006:1,opt-007:2,opt-008:2,opt-009:2,opt-010:2,opt-011:2,opt-012:2,opt-013:2,opt-014:2,
        opt-015:2,opt-016:2,opt-017:2,opt-018:2,opt-019:2,opt-020:2,opt-021:2,opt-022:2,opt-023:2,opt-024:2,opt-025:1,opt-027:2,opt-039:1,
        opt-041:1,opt-042:1,opt-043:1,opt-044:1,opt-045:1,opt-046:1,opt-047:1,opt-048:1,opt-049:1,opt-050:1" 
        index="0" nodecount="33" proccount="8" reqid="0" starttime="1162876617"></range>
    </par>
  <par Name="32Bit">
    <range duration="1200" hostlist="x86-001:1,x86-002:1,x86-004:1,x86-006:1,x86-013:1,x86-014:1,x86-015:1,x86-016:1,x86-037:1" 
        index="0" nodecount="9" proccount="8" reqid="0" starttime="1162425519"></range>
    <range duration="1200" hostlist="x86-001:1,x86-002:1,x86-004:1,x86-006:1,x86-013:1,x86-014:1,x86-015:1,x86-016:1,x86-037:1,x86-042:1,x86-043:1" 
        index="0" nodecount="11" proccount="8" reqid="0" starttime="1162956803"></range>
    <range duration="1200" hostlist="x86-001:1,x86-002:1,x86-004:1,x86-006:1,x86-013:1,x86-014:1,x86-015:1,x86-016:1,x86-027:1,x86-028:1,
        x86-029:1,x86-030:1,x86-037:1,x86-041:1,x86-042:1,x86-043:1,x86-046:1,x86-047:1,x86-048:1,x86-049:1" 
        index="0" nodecount="20" proccount="8" reqid="0" starttime="1163053393"></range>
    </par>
  </Data>

NOTE: This command reports the original query, and the timeframe, resource size, and hostlist associated with each possible time slot.

See Also: