Show job details for executing job from job session
```console
$scontrol -d show job $SLURM_JOBID
```
## Slurm job environment variables
Slurm provides usefull information to the job via environment variables. Environment variables are available on all nodes allocated to job when accessed via Slurm supported means (srun, compatible mpirun).
See all Slurm variables
```
set |grep ^SLURM
```
Useful Slurm variables
| variable name | description | example |
| ------ | ------ | ------ |
|SLURM_JOBID| job id of the executing job| 593 |
|SLURM_JOB_NODELIST| nodes allocated to job | p03-amd[01-02] |
|SLURM_JOB_NUM_NODES| number of nodes allocated to job | 2 |
|SLURM_STEP_NODELIST| nodes allocated to job step | p03-amd01 |
|SLURM_STEP_NUM_NODES| number of nodes allocated to job | 1 |
|SLURM_JOB_PARTITION| name of the partition | p03-amd |