mshow -a

Synopsis

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

Overview

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

Arguments

INTERSECTION
NO AGGREGATE
TIMELOCK
WHERE
EXCLUSIVE


Table 1: Argument Format

--flags
Flags
--flags=[ future | policy | tid | timeflex | 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 (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.
timeflex allows the reservation to move in time (but not space) in order to start at an earlier time, if able.
verbose will return diagnostic information.
> 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 -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.
  
  
-T
TIMELOCK
---
Specifies that the multiple requirements of an mshow -a command should be timelocked.
> 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 six co-allocation clauses).
> 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 -a -w minprocs=1,os=linux -w minprocs=1,os=aix --flags=tid -x


Table 2: Request Attributes

NameDescription
the account credential of the requestor
ACL to attach to the reservation

This ACL must be enclosed in quotation marks. For example:
$ mshow -a ... -w acl=\"user=john\" ...
select only nodes with the specified architecture
the class credential of the requestor
the co-allocation group of the specific Where request (can be any string but must match co-allocation group of at least one other Whererequest)
NoteThe number of tasks requested in each Whererequest must be equal whether this taskcount is specified via minprocs, mintasks, or gres.
the number of profiles to apply to the resource request
Possible value is future. (Example: displaymode=future). Constrains how results are presented; setting future evaluates which resources are available now and which resources will be available in the future that match the requested attributes.
the duration for which the resources will be required in format [[[DD:]HH:]MM:]SS
do not select any nodes from the given list
select only nodes which possess the specified generic resource
the group credential of the requestor
select only the specified resources
use the resource, duration, and credential information for the job specified as a resource request template
select only resources which would allow access to jobs with the specified job features
select only resources which would allow access to jobs with the specified job flags. The jobflags attribute accepts a colon delimited list of multiple flags.
associate the specified label with all results matching this request
return only results with at least the number of nodes specified. If used with TID's, return only solutions with exactly minnodes nodes available
return only results with at least the number of processors specified. If used with TID's, return only solutions with exactly minprocs processors available
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
select only nodes with at least nodedisk MB of local disk configured
select only nodes with all specified features present using format <feature>[:<feature>]...
select only nodes with at least nodemem MB of memory configured
select only resources which can be co-allocated with the specified time offset where offset is specified in the format [[[DD:]HH:]MM:]SS
select only nodes with have, or can be provisioned to have, the specified operating system
the partition in which the resources must be located
enable policy enforcement at the specified policy constraint level
the qos credential of the requestor
use the specified profile if committing a resulting transaction id directly to a reservation
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>).
NoteThe 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.
require taskmem MB of memory per task located
require exactly tpn tasks per node on all discovered resources
the user credential of the requestor
use associated variables in generating per transaction charging quotes
takes a string of the format variables='var[=attr]'[;'var[=attr]' and passes the variables onto the reservation when used in conjunction with --flags=tid and mrsvctl -c -R <tid>.

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). 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 -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 -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 -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 -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 -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>
NoteThis command reports the original query, and the timeframe, resource size, and hostlist associated with each possible time slot.

See Also

Copyright © 2012 Adaptive Computing Enterprises, Inc.®