<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>I know I'm very late to this thread, but were/are you using the
      --allusers flag to sacct? If not, sacct only returns results for
      the user running the command (not sure if this is the case for
      root - I never need to run sacct as root). This minor detail
      tripped me up a few days ago when I was expecting hundreds of
      thousands of results, and only got a couple hundred, which were
      *my* jobs from the period I was searching, not *all* jobs. I was
      about to have a heart attack because I thought someone purged the
      SlurmDB. <br>
    </p>
    <p><br>
    </p>
    <p>For those wondering, I was using  -o to get only a few pieces of
      data per job  from my query, and userid wasn't one of them, which
      is why my mistake wasn't so obvious at first. <br>
    </p>
    <p><br>
    </p>
    <p>Prentice</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 11/12/2020 4:49 PM, Erik Bryer
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:MW3PR16MB3659395359225D5BD5085B0FC8E70@MW3PR16MB3659.namprd16.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        That worked pretty well in that I got more data than I ever have
        before by a lot. It only goes back about 18 days, but I'm not
        sure why. The slurmdbd.conf back then contained no directives on
        retaining logs, which is supposed to mean it defaults to
        retaining them indefinitely. On another test cluster it shows
        records back 2 days, which is about when I started fiddling with
        the settings. Could that have wiped the previous records, if
        they existed, or have my changes started the saving of older
        data. Still, this is progress.</div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        Erik</div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b>
          slurm-users <a class="moz-txt-link-rfc2396E" href="mailto:slurm-users-bounces@lists.schedmd.com"><slurm-users-bounces@lists.schedmd.com></a> on
          behalf of Sebastian T Smith <a class="moz-txt-link-rfc2396E" href="mailto:stsmith@unr.edu"><stsmith@unr.edu></a><br>
          <b>Sent:</b> Thursday, November 12, 2020 2:32 PM<br>
          <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:slurm-users@lists.schedmd.com">slurm-users@lists.schedmd.com</a>
          <a class="moz-txt-link-rfc2396E" href="mailto:slurm-users@lists.schedmd.com"><slurm-users@lists.schedmd.com></a><br>
          <b>Subject:</b> Re: [slurm-users] can't lengthen my jobs log</font>
        <div> </div>
      </div>
      <style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}</style>
      <div dir="ltr">
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          Hi John,</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          Have you tried specifying a start time?  The default is
          00:00:00 of the current day (depending on other options). 
          Example:</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          sacct -S 2020-11-01T00:00:00</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          Our accounting database retains all job data from the epoch of
          our system.<br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          Best,</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0);
          background-color:rgb(255,255,255)">
          Sebastian<br>
        </div>
        <div>
          <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
            font-size:12pt; color:rgb(0,0,0)">
            <br>
          </div>
          <div id="x_Signature">
            <div>
              <div id="x_divtagdefaultwrapper" dir="ltr"
                style="font-size:12pt; color:rgb(0,0,0);
                font-family:Calibri,Arial,Helvetica,sans-serif">
                <div style="font-family:Tahoma; font-size:13px">
                  <div style="font-family:Tahoma; font-size:13px">
                    <div class="x_BodyFragment"><font size="2"><span
                          style="font-size:10pt">
                          <div class="x_PlainText">
                            <div id="x_emailSignature"
                              style="display:block">--</div>
                            <div id="x_emailSignature"
                              style="display:block"><br>
                              <table style="box-sizing:border-box;
                                border-collapse:collapse;
                                border-spacing:0px;
                                background-color:rgb(255,255,255);
                                max-width:100%; text-align:start;
                                font-family:Helvetica,Arial,san-serif;
                                width:480px">
                                <tbody style="box-sizing:border-box">
                                  <tr style="box-sizing:border-box">
                                    <td style="box-sizing:border-box;
                                      vertical-align:top" width="75"><a
                                        href="http://www.unr.edu/"
                                        style="box-sizing:border-box;
                                        background:transparent none
                                        repeat scroll 0% 0%;
                                        color:rgb(46,108,162);
                                        text-decoration:underline"
                                        moz-do-not-send="true"><img
                                          alt="University of Nevada,
                                          Reno"
                                          style="box-sizing:border-box;
                                          vertical-align:middle"
                                          src="https://www.unr.edu/assets/images/blockn-100x100.png"
                                          moz-do-not-send="true"
                                          width="75"></a></td>
                                    <td style="box-sizing:border-box"
                                      width="20"> </td>
                                    <td style="box-sizing:border-box;
                                      vertical-align:top" width="385">
                                      <table
                                        style="box-sizing:border-box;
                                        border-collapse:collapse;
                                        max-width:100%; width:385px;
                                        text-align:left">
                                        <tbody
                                          style="box-sizing:border-box">
                                          <tr
                                            style="box-sizing:border-box">
                                            <td
                                              style="box-sizing:border-box;
                                              vertical-align:top"><span
style="box-sizing:border-box"><span style="box-sizing:border-box;
                                                  color:rgb(0,51,102)"><strong
style="box-sizing:border-box; font-weight:bold"><span
                                                      style="box-sizing:border-box">Sebastian
                                                      Smith<br
                                                        style="box-sizing:border-box">
                                                    </span></strong></span><span
style="box-sizing:border-box"><span style="box-sizing:border-box">High-Performance
                                                    Computing Engineer<br
style="box-sizing:border-box">
                                                  </span><span
                                                    style="box-sizing:border-box">Office
                                                    of Information
                                                    Technology<br
                                                      style="box-sizing:border-box">
                                                  </span><span
                                                    style="box-sizing:border-box">1664
                                                    North Virginia
                                                    Street<br
                                                      style="box-sizing:border-box">
                                                  </span><span
                                                    style="box-sizing:border-box">MS
                                                    0291<br
                                                      style="box-sizing:border-box">
                                                  </span><span
                                                    style="box-sizing:border-box"></span><span
style="box-sizing:border-box"></span><br style="box-sizing:border-box">
                                                  <strong
                                                    style="box-sizing:border-box;
                                                    font-weight:bold">work-phone:<span> </span></strong><span
style="box-sizing:border-box"><a href="tel:7756825050"
                                                      style="box-sizing:border-box;
background:transparent none repeat scroll 0% 0%;
                                                      text-decoration:underline"
moz-do-not-send="true">775-682-5050</a><br style="box-sizing:border-box">
                                                  </span><strong
                                                    style="box-sizing:border-box;
                                                    font-weight:bold"></strong><span
style="box-sizing:border-box"></span><strong
                                                    style="box-sizing:border-box;
                                                    font-weight:bold">email:<span> </span></strong><span
style="box-sizing:border-box"><a href="mailto:stsmith@unr.edu"
                                                      style="box-sizing:border-box;
background:transparent none repeat scroll 0% 0%;
                                                      text-decoration:underline"
moz-do-not-send="true">stsmith@unr.edu</a><br
                                                      style="box-sizing:border-box">
                                                  </span><strong
                                                    style="box-sizing:border-box;
                                                    font-weight:bold">website:<span> </span></strong><span
style="box-sizing:border-box"><a href="http://rc.unr.edu/"
                                                      style="box-sizing:border-box;
background:transparent none repeat scroll 0% 0%;
                                                      text-decoration:underline"
moz-do-not-send="true">http://rc.unr.edu</a><br
                                                      style="box-sizing:border-box">
                                                  </span></span><br
                                                  style="box-sizing:border-box">
                                              </span></td>
                                          </tr>
                                        </tbody>
                                      </table>
                                    </td>
                                  </tr>
                                </tbody>
                              </table>
                            </div>
                          </div>
                        </span></font></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <hr tabindex="-1" style="display:inline-block; width:98%">
        <div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
            face="Calibri, sans-serif" color="#000000"><b>From:</b>
            slurm-users <a class="moz-txt-link-rfc2396E" href="mailto:slurm-users-bounces@lists.schedmd.com"><slurm-users-bounces@lists.schedmd.com></a> on
            behalf of john abignail <a class="moz-txt-link-rfc2396E" href="mailto:abignailjohn@gmail.com"><abignailjohn@gmail.com></a><br>
            <b>Sent:</b> Thursday, November 12, 2020 12:57 PM<br>
            <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:slurm-users@lists.schedmd.com">slurm-users@lists.schedmd.com</a>
            <a class="moz-txt-link-rfc2396E" href="mailto:slurm-users@lists.schedmd.com"><slurm-users@lists.schedmd.com></a><br>
            <b>Subject:</b> [slurm-users] can't lengthen my jobs log</font>
          <div> </div>
        </div>
        <div>
          <div dir="ltr">
            <div dir="ltr">Hi,</div>
            <div dir="ltr"><br>
            </div>
            <div dir="ltr">My jobs database empties after about 1 day.
              "sacct -a" returns no results. I've tried to lengthen
              that, but have been unsuccessful. I've tried adding the
              following to slurmdbd.conf and restarting slurmdbd:
              <div>
                <div>ArchiveJobs=yes</div>
                <div>PurgeEventAfter=1month</div>
                <div>PurgeJobAfter=12month</div>
                <div>PurgeResvAfter=1month</div>
                <div>PurgeStepAfter=1month</div>
                <div>PurgeSuspendAfter=1month</div>
                <div>PurgeTXNAfter=12month</div>
                <div>PurgeUsageAfter=24month</div>
              </div>
              <div>No job archives appear (in the default /tmp dir)
                either. What I'd like to do is have the slurm database
                retain information on jobs for at least a few weeks,
                writing out data beyond that threshold to files, but
                mainly I just want to keep job data in the database for
                longer.</div>
              <div><br>
              </div>
              <div>Regards,</div>
              <div>John</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>