[slurm-users] Job Step State

2 views
Skip to first unread message

Emyr James via slurm-users

unread,
Jul 12, 2024, 5:53:26 AM (4 days ago) Jul 12
to slurm...@lists.schedmd.com
Dear all,

I am working on a script to take completed job accounting data from the slurm accounting database and insert the equivalent data into a clickhouse table for fast reporting

I can see that all the information is included in the cluster_job_table and cluster_job_step_table which seem to be joined on job_db_inx

To get the cpu usage and peak memory usage etc. I can see that I need to parse the tres columns in the job steps. I couldn't find any column called MaxRSS in the database even though the sacct command prints this. I then found some data in tres_table and assume that sacct is using this. Please correct me if I'm wrong and if sacct is getting information from somwhere other than the accounting database?

for the state column I get this...

select state, count(*) as num from  crg_step_table group by state order by num desc limit 10;

+-------+--------+
| state | num    |
+-------+--------+
|     3 | 590635 |
|     5 |  28345 |
|     4 |   4401 |
|    11 |    962 |
|     1 |      8 |
+-------+--------+

When I use sacct I see statuses seach as COMPLETED, OUT_OF_MEMORY etc. so there must be a mapping somewhere between these state ids and that text. Can someone prvide that mapping or point me to where it's defined in the database or in the code ?

Many thanks,


Emyr James
Head of Scientific IT
CRG - Centre for Genomic Regulation

Laura Hild via slurm-users

unread,
Jul 12, 2024, 12:51:20 PM (4 days ago) Jul 12
to Emyr James, slurm...@lists.schedmd.com
There's an enum job_states in slurm.h. It becomes OUT_OF_MEMORY, &c. in the job_state_string function in slurm_protocol_defs.c.


--
slurm-users mailing list -- slurm...@lists.schedmd.com
To unsubscribe send an email to slurm-us...@lists.schedmd.com
Reply all
Reply to author
Forward
0 new messages