{"id":589,"date":"2020-05-13T16:05:32","date_gmt":"2020-05-13T14:05:32","guid":{"rendered":"http:\/\/calculs.univ-cotedazur.fr\/?page_id=589"},"modified":"2021-06-14T10:20:21","modified_gmt":"2021-06-14T08:20:21","slug":"tracking-jobs","status":"publish","type":"page","link":"https:\/\/calculs.univ-cotedazur.fr\/?page_id=589&lang=en","title":{"rendered":"Monitoring your jobs"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_11 counter-hierarchy counter-decimal ez-toc-grey\">\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=589&amp;lang=en#Track_a_job_in_progress\" title=\"Track a job in progress \">Track a job in progress <\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=589&amp;lang=en#Track_the_consumption_of_CPU_hours_for_my_projects\" title=\"Track the consumption of\nCPU hours for my projects\">Track the consumption of\nCPU hours for my projects<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=589&amp;lang=en#View_my_job_history\" title=\"View my job history\">View my job history<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=589&amp;lang=en#Cancel_a_job\" title=\"Cancel a job\">Cancel a job<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Track_a_job_in_progress\"><\/span>Track a job in progress <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Once you have submitted a job, you can follow its status with the command <strong>squeue:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"580\" height=\"37\" src=\"https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2020\/02\/squeue_colonne_st.png\" alt=\"squeue_colonne_st.png\" class=\"wp-image-114\" srcset=\"https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2020\/02\/squeue_colonne_st.png 580w, https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2020\/02\/squeue_colonne_st-300x19.png 300w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><figcaption> The different states for a a job (column ST) are: CA (canceled), CD (completed), CF (configuring), CG (completing), F (failed), NF (node fail), PD (pending), R (running), TO (timeout) <\/figcaption><\/figure>\n\n\n\n<p>Your job can be pending for several reasons <a href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=682&amp;lang=en\" target=\"_blank\" rel=\"noreferrer noopener\">listed on this page.<\/a><\/p>\n\n\n\n<p>To get the full details of a job in progress, use the command:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"> scontrol show job &lt;JOBID&gt; <\/pre>\n\n\n\n<p>For jobs submitted with <strong>sbatch<\/strong>,\nstandard output and errors are by default written to a file named\nslurm-&lt;JOBID&gt;.out. You can specify another file with the <em>output option<\/em>.<\/p>\n\n\n\n<p>If you mentioned your e-mail (see above example of submission with <strong>sbatch<\/strong>), you will receive an e-mail at each stage mentioned in <em>mail-type&nbsp;<\/em>(the full list of options is available <a rel=\"noreferrer noopener\" aria-label=\"here (s\u2019ouvre dans un nouvel onglet)\" href=\"https:\/\/slurm.schedmd.com\/sbatch.html\" target=\"_blank\">here<\/a>). <\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"Track_the_consumption_of_CPU_hours_for_my_projects\"><\/span>Track the consumption of\nCPU hours for my projects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Launching the command <strong>usage_info&nbsp;<\/strong>will\nallow you to consult for each of your projects the CPU time already consumed\ncompared to the total time which has been allocated by the scientific\ncommittee. This consumed time includes the consumptions made by all the project\nmembers having a user account on the cluster. The time counter is updated each\ntime a job is finished.<\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"View_my_job_history\"><\/span>View my job history<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-verse\">sacct -u &lt;username&gt; --format=JobID,JobName,partition,alloccpus,state,elapsed,maxrss,totalcpu,start,end -S &lt;MM\/JJ\/AA&gt;<\/pre>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"Cancel_a_job\"><\/span>Cancel a job<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-verse\">scancel &lt;JOBID&gt;<\/pre>\n\n\n\n<p>To cancel all my pending jobs:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">scancel -u username --state=pending<\/pre>\n\n\n\n<p>To cancel all my jobs (running and pending):<\/p>\n\n\n\n<pre class=\"wp-block-verse\">scancel -u username<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Track a job in progress Once you have submitted a job, you can follow its status with the command squeue: Your job can be pending for several reasons listed on this page. To get the full details of a job &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":552,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/589"}],"collection":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=589"}],"version-history":[{"count":11,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/589\/revisions"}],"predecessor-version":[{"id":1487,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/589\/revisions\/1487"}],"up":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/552"}],"wp:attachment":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}