<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>Monitor jobs</title><revhistory><revision><revnumber>9</revnumber><date>2023-04-25 11:29:10</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>8</revnumber><date>2023-04-25 09:53:34</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>7</revnumber><date>2021-10-29 14:53:06</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>6</revnumber><date>2021-10-29 14:35:56</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>5</revnumber><date>2021-10-29 14:34:16</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>4</revnumber><date>2021-10-29 09:34:36</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>3</revnumber><date>2020-11-02 14:37:03</date><authorinitials>fhoma</authorinitials><revremark>Adding formated sqeue example</revremark></revision><revision><revnumber>2</revnumber><date>2020-09-24 16:46:59</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>1</revnumber><date>2020-05-13 20:56:35</date><authorinitials>fhoma</authorinitials><revremark>Monitor jobs</revremark></revision></revhistory></articleinfo><para><anchor id="top|scroll to the top of the page"/> </para><section><title>Monitor jobs</title><para>We assume that you have submitted jobs that are currently running. The idea now is to know the status of your jobs. </para><section><title>Email notifications</title><para>If you have used the options <emphasis>--mail-user</emphasis> &amp; <emphasis>--mail-type</emphasis>, you should get email notification when your job reaches a specific status. When <emphasis>--mail-type</emphasis> is set to <emphasis>ALL</emphasis> you will be notified for every status of your job. Here are the possible values for <emphasis>--mail-type</emphasis>, </para><glosslist><glossentry><glossterm>BEGIN</glossterm><glossdef><para>When job is allocated </para></glossdef></glossentry><glossentry><glossterm>END</glossterm><glossdef><para>When job is done </para></glossdef></glossentry><glossentry><glossterm>FAIL</glossterm><glossdef><para>When job has fail </para></glossdef></glossentry><glossentry><glossterm>REQUEUE</glossterm><glossdef><para>When a fail or finished job is put back into the queue </para></glossdef></glossentry><glossentry><glossterm>STAGE_OUT</glossterm><glossdef><para>Burst buffer stage out and teardown completed </para></glossdef></glossentry><glossentry><glossterm>TIME_LIMIT</glossterm><glossdef><para>When job has reached 100% of time limit </para></glossdef></glossentry><glossentry><glossterm>TIME_LIMIT_90</glossterm><glossdef><para>When job has reached 90% of time limit </para></glossdef></glossentry><glossentry><glossterm>TIME_LIMIT_80</glossterm><glossdef><para>When job has reached 80% of time limit </para></glossdef></glossentry><glossentry><glossterm>TIME_LIMIT_50</glossterm><glossdef><para>When job has reached 50% of time limit </para></glossdef></glossentry><glossentry><glossterm>ARRAY_TASKS</glossterm><glossdef><para>Send emails for each array task </para></glossdef></glossentry><glossentry><glossterm>ALL</glossterm><glossdef><para>BEGIN, END, FAIL, REQUEUE, STAGE_OUT </para></glossdef></glossentry></glosslist><para>Have a look at the help of the command SBATCH to know more about notifications. </para></section><section><title>Status of submitted jobs</title><section><title>squeue</title><para>Check the status of the queue using. </para><programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><lineannotation><![CDATA[# Print all jobs currently in the queue]]></lineannotation>
<lineannotation></lineannotation><![CDATA[squeue]]>

<lineannotation><![CDATA[# Check owned jobs in the queue]]></lineannotation>
<lineannotation></lineannotation><![CDATA[squeue -u <<USERNAME>>]]>

<lineannotation><![CDATA[# Check a list of jobs]]></lineannotation>
<lineannotation></lineannotation><![CDATA[squeue --jobs ]]><phrase><![CDATA[<<JOBID or comma separated list of JOBID]]></phrase><![CDATA[s>>]]>

<lineannotation><![CDATA[# You can format the output of squeue. For example to get more details about the running jobs use,]]></lineannotation>
<lineannotation></lineannotation><![CDATA[squeue -o ]]><phrase><![CDATA["%.7i %.9P %.8j %.8u %.2t %.10M %.6D %C %.10m"]]></phrase>

<lineannotation><![CDATA[# For more info about squeue]]></lineannotation>
<lineannotation></lineannotation><![CDATA[man squeue]]>
</programlisting></section><section><title>scancel</title><para>Cancel a pending or running job or job step. <emphasis>It can also be used to send an arbitrary signal to all processes associated with a running job or job step.</emphasis> </para><programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[scancel ]]><phrase><![CDATA[<<JOBID or comma separated list of JOBID]]></phrase><![CDATA[s>>]]>

<lineannotation><![CDATA[# learn more about scancel option]]></lineannotation>
<lineannotation></lineannotation><![CDATA[man scancel]]>
</programlisting></section><section><title>sstat</title><para>Prints information about the resources utilized by a running job or job step. </para><programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[sstat -j ]]><phrase><![CDATA[<<JOBID or comma separated list of JOBID]]></phrase><![CDATA[s>>]]>

<lineannotation><![CDATA[# learn more about sstat]]></lineannotation>
<lineannotation></lineannotation><![CDATA[man sstat]]>
</programlisting></section><section><title>sacct</title><para>Reports job or job step accounting information about active or completed jobs. </para><programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><lineannotation><![CDATA[# Print admin info about a job]]></lineannotation>
<lineannotation></lineannotation><![CDATA[sacct -j ]]><phrase><![CDATA[<<JOBID or comma separated list of JOBID]]></phrase><![CDATA[s>>]]>


<lineannotation><![CDATA[# Print CPU time and memory usage of a job]]></lineannotation>
<lineannotation></lineannotation><![CDATA[sacct --format=]]><phrase><![CDATA["CPUTime,MaxRSS"]]></phrase><![CDATA[ -j <<JOBID>>]]>

<lineannotation><![CDATA[# Print a list of all the job a user has been running]]></lineannotation>
<lineannotation></lineannotation><![CDATA[sacct -u <<USERNAME>>]]>

<lineannotation><![CDATA[# learn more about sacct options]]></lineannotation>
<lineannotation></lineannotation><![CDATA[man sacct]]>
</programlisting></section></section><section><title>Status of nodes</title><para>Use the command <emphasis role="strong">sinfo</emphasis> to report the state of partitions and nodes. </para></section><section><title>Quick links</title><orderedlist numeration="arabic"><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/Computers%20description#">Computers description</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/Request%20an%20account#">Request an account</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/storage%20description#">storage description</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/First%20login#">First login</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/Receiving%20sequencing%20data#">Receiving sequencing data</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/transferring%20data#">transferring data</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/Submitting%20jobs#">Submitting jobs</ulink> </para></listitem><listitem><para><link linkend="">Monitor jobs</link> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/Install%20tools#">Install tools</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Monitor%20jobs/wiki.potato/Space%20management#">Space management</ulink> </para></listitem></orderedlist><para><link linkend="top">#top</link> </para></section></section></article>