3.8 mcredctl
3.8.1 Synopsis
mcredctl [-d credtype[:credid]]
[-h credtype:credid]
[-l credtype]
[-q {role|limit|profile|accessfrom|accessto|policies} credtype[:credid]] [--format=xml]
[-r {stats|fairshare|uid} <type>[:<ID>]
[-t <STARTTIME>[,<ENDTIME>]
3.8.2 Overview
The mcredctl command controls various aspects
about the credential objects within Moab. It can be used to display
configuration, limits, roles, and relationships for various Moab credential objects.
If using Insight, you must restart Moab to view credential modifications.
3.8.3 Arguments
In all cases <CREDTYPE> is one of acct,
group, user, class, or qos.
In most cases it is necessary to use the
--format=xml flag in order to print the output (see examples below for
specific syntax requirements).
-d
- DESTROY
|
Format |
<TYPE>:<VAL> |
Description |
Purge a credential from moab.cfg (does not delete
credential from memory). |
Example |
All references to USERCFG[john] will be commented out of moab.cfg)
|
-h
- HOLD
|
Format |
<TYPE>:<VAL> |
Description |
Toggles whether a given credentials' jobs should be place on hold or not. |
Example |
User [john] will be put on hold.
|
-l
- LIST
|
Format |
<TYPE>
|
Description |
List the various sub-objects of the specified credential. |
Example |
> mcredctl -l user --format=xml
List all users within Moab in XML.
> mcredctl -l group --format=xml
List all groups within Moab in XML.
|
-q
- QUERY
|
Format |
{role | accessfrom | accessto | limit| profile | policies}
limit <TYPE>
policies <TYPE>
role <USER>:<USERID>
profile <TYPE>[:<VAL>]
accessfrom <TYPE>[:<VAL>]
accessto <TYPE>[:<VAL>]
|
Description: |
Display various aspects of a credential (formatted in XML) |
Example: |
> mcredctl -q role user:bob --format=xml
View user bob's administrative role within Moab in XML
> mcredctl -q limit acct --format=xml
Display limits for all accounts in XML
> mcredctl -q policies user:bob
View limits organized by credential for user bob on each partition and resource manager
> mcredctl -q profile group --format=xml --timeout=00:10:00 -o time:1388590200,1431529200,types:TPSD
Generates a report of processor hours used by groups per month. TPSD represents total proc-seconds dedicated by this credental in the profiling interval.
|
-r
- RESET
|
Format |
{stats|fairshare|uid} <TYPE> [:<ID>] |
Description |
Reset the stats, fairshare, or uid/gid of a given credential.
When resetting uid, only a type of user is supported.
|
Example |
> mcredctl -r uid user:john
Resets the UID/GID for the user named john.
|
-t
- TIMEFRAME
|
Format |
<STARTTIME>[,<ENDTIME>] |
Description |
Can be used in conjunction with the -q profile option to display profiling information for the specified timeframe. |
Example |
> mcredctl -q profile user -t 14:30_06/20
|
3.8.4 Credential Statistics XML Output
Credential statistics can be requested as XML (via the --format=xml argument) and
will be written to STDOUT in the following format:
> mcredctl -q profile user --format=xml -o time:1182927600,1183013999
<Data>
<user ...>
<Profile ...>
</Profile>
</user>
</Data>
Example 3-8: Deleting a group
> mcredctl -d group:john
GROUPCFG[john] Successfully purged from config files
Example 3-9: List users in XML format
> mcredctl -l user --format=xml
<Data><user ID="john"</user><user ID="john"></user><user ID="root"></user><user ID="dev"></user></Data>
Example 3-10: Display information about a user
> mcredctl -q role user:john --format=xml
<Data><user ID="test" role="admin5"></user></Data>
Related Topics
1.1.7 (Optional) Install Moab Client - explains
how to distribute this command to client nodes