<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:-webkit-standard;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">In a word, nothing that's guaranteed to be stable. I got my start from this reply on the XDMoD list in November 2019. Worked on 8.0:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"-webkit-standard",serif;color:black">Mike,<br>
<br>
</span><span style="color:black">The recommended way of doing this would be to use XDMoD's Report Generator to periodically email you a document containing the chart images.</span><span style="font-family:"-webkit-standard",serif;color:black"><br>
<br>
</span><a href="https://xdmod.ccr.buffalo.edu/user_manual/?t=Report%20Generator" title="https://xdmod.ccr.buffalo.edu/user_manual/?t=Report%20Generator"><span style="font-family:"-webkit-standard",serif">https://xdmod.ccr.buffalo.edu/user_manual/?t=Report%20Generator</span></a><span style="font-family:"-webkit-standard",serif;color:black"><br>
<br>
This will only get you the images, though and not the numerical values.<br>
<br>
</span><span style="color:black">The more complex alternative is to use curl to query XDMoD directly. An example of how to download chart images is in the automated regression tests that verify image export:</span><span style="font-family:"-webkit-standard",serif;color:black"><br>
<br>
</span><a href="https://github.com/ubccr/xdmod/blob/xdmod9.0/tests/regression/lib/Controllers/UsageChartsTest.php" title="https://github.com/ubccr/xdmod/blob/xdmod9.0/tests/regression/lib/Controllers/UsageChartsTest.php"><span style="font-family:"-webkit-standard",serif">https://github.com/ubccr/xdmod/blob/xdmod9.0/tests/regression/lib/Controllers/UsageChartsTest.php</span></a><span style="font-family:"-webkit-standard",serif;color:black"><br>
<br>
See the chartSettingsProvider() for how to create the data to send and testChartSettings() for where to POST it. To get the raw numbers you can change the 'format'<br>
</span><span style="color:black">setting from 'png' to 'csv' to get the raw data in csv format. Note that you would be accessing an internal XDMoD api which could change or even be removed in new releases.</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">slurm-users <slurm-users-bounces@lists.schedmd.com> on behalf of Kilian Cavalotti <kilian.cavalotti.work@gmail.com><br>
<b>Date: </b>Tuesday, May 11, 2021 at 1:57 PM<br>
<b>To: </b>Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Subject: </b>Re: [slurm-users] Cluster usage, filtered by partition<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">On Tue, May 11, 2021 at 5:55 AM Renfro, Michael <Renfro@tntech.edu> wrote:<br>
><br>
> XDMoD [1] is useful for this, but it’s not a simple script. It does have some user-accessible APIs if you want some report automation. I’m using that to create a lightning-talk-style slide at [2].<br>
><br>
> [1] <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopen.xdmod.org%2F&amp;data=04%7C01%7Crenfro%40tntech.edu%7C406944c7097041e8402f08d914ae978f%7C66fecaf83dc04d2cb8b8eff0ddea46f0%7C1%7C0%7C637563562374746702%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Mla%2BlItr2M4XNEzP7UoAAP2z3P%2FPPmfE2%2B8zTwTE4W4%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopen.xdmod.org%2F&amp;data=04%7C01%7Crenfro%40tntech.edu%7C406944c7097041e8402f08d914ae978f%7C66fecaf83dc04d2cb8b8eff0ddea46f0%7C1%7C0%7C637563562374746702%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Mla%2BlItr2M4XNEzP7UoAAP2z3P%2FPPmfE2%2B8zTwTE4W4%3D&amp;reserved=0</a><br>
> [2] <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmikerenfro%2Fone-page-presentation-hpc&amp;data=04%7C01%7Crenfro%40tntech.edu%7C406944c7097041e8402f08d914ae978f%7C66fecaf83dc04d2cb8b8eff0ddea46f0%7C1%7C0%7C637563562374746702%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=pkOtpZ7L7qyiK8kICUmJGPioIwzxvCRC0i%2BQOC9usHM%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmikerenfro%2Fone-page-presentation-hpc&amp;data=04%7C01%7Crenfro%40tntech.edu%7C406944c7097041e8402f08d914ae978f%7C66fecaf83dc04d2cb8b8eff0ddea46f0%7C1%7C0%7C637563562374746702%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=pkOtpZ7L7qyiK8kICUmJGPioIwzxvCRC0i%2BQOC9usHM%3D&amp;reserved=0</a><br>
<br>
Oh, that looks useful! Is the XDMoD API documented somewhere?<br>
<br>
Thanks,<br>
--<br>
Kilian<o:p></o:p></p>
</div>
</div>
</body>
</html>