| <!--#include virtual="header.txt"--> |
| |
| <h1>Workload Characterization Key (WCKey) Management</h1> |
| |
| <p>A WCKey is an orthogonal way to do accounting against possibly |
| unrelated accounts. This can be useful where users from different |
| accounts are all working on the same project. |
| </p> |
| |
| <h2 id="conf">slurm(dbd).conf settings |
| <a class="slurm_link" href="#conf"></a> |
| </h2> |
| <p>Including "WCKey" in your <b>AccountingStorageEnforce</b> option in |
| your slurm.conf file will enforce WCKeys per job. This means only |
| jobs with valid WCKeys (WCKeys previously added through sacctmgr) |
| will be allowed to run. |
| <p> |
| <p>If you wish to track the value of a jobs WCKey you must set |
| the <b>TrackWCKey</b> option in both the slurm.conf as well as the |
| slurmdbd.conf files. This will assure the WCKey is tracked on each |
| job. If you set "WCKey" in your <b>AccountingStorageEnforce</b> |
| line <b>TrackWCKey</b> is set automatically, it still needs to be |
| added to your slurmdbd.conf file though. |
| </p> |
| |
| <h2 id="submit">sbatch/salloc/srun<a class="slurm_link" href="#submit"></a></h2> |
| <p> Each submitting tool has the --wckey= option that can set the WCKey for a |
| job. [SBATCH|SALLOC|SLURM]_WCKEY can also be set in the environment |
| to set the WCKey. If no WCKey is given the WCKey for the job will be |
| set to the users default WCKey for the cluster, which can be set up |
| with sacctmgr. Also if no WCKey is specified the accounting record |
| is appended with a '*' to signify the WCKey was not specified. This |
| is useful for a manager to determine if a user is specifying their |
| WCKey or not. |
| </p> |
| |
| <h2 id="sacct">sacct<a class="slurm_link" href="#sacct"></a></h2> |
| <p>Sacct can be used to view the WCKey by adding "wckey" to the |
| --format option. You can also single out jobs by using the |
| --wckeys= option which would only send information about jobs that |
| ran with specific WCKeys. |
| </p> |
| |
| <h2 id="sacctmgr">sacctmgr<a class="slurm_link" href="#sacctmgr"></a></h2> |
| <p>Sacctmgr is used to manage WCKeys. You can add and remove WCKeys |
| from users or list them. |
| </p> |
| <p>You add a user to a WCKey much like you do an account, only the |
| WCKey doesn't need to be created before hand. i.e. |
| </p> |
| <pre> |
| sacctmgr add user da wckey=secret_project |
| </pre> |
| |
| <p> You can remove them from a WCKey in the same fashion. |
| </p> |
| |
| <pre> |
| sacctmgr del user da wckey=secret_project |
| </pre> |
| |
| <p> To alter the users default WCKey you can run a line like |
| </p> |
| <pre> |
| sacctmgr mod user da cluster=snowflake set defaultwckey=secret_project |
| </pre> |
| |
| <p> |
| Which will change the default WCKey for user "da" on cluster |
| "snowflake" to be "secret_project". If you want this for all clusters |
| just remove the cluster= option. |
| </p> |
| |
| <h2 id="sreport">sreport<a class="slurm_link" href="#sreport"></a></h2> |
| <p>Information about reports available for WCKeys can be |
| found on the <a href="sreport.html">sreport manpage</a>. |
| </p> |
| <p style="text-align:center;">Last modified 14 November 2014</p> |
| |
| <!--#include virtual="footer.txt"--> |