<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Inccorect aggregate used size output from sdk for java in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Inccorect-aggregate-used-size-output-from-sdk-for-java/m-p/99837#M1334</link>
    <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying out the sdk to gather info on my filers and ran accross an&amp;nbsp;issue with the output that the 8.1.3 API is returning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From the java docs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;getSizeUsed&lt;/P&gt;&lt;PRE&gt;public &lt;A href="http://download.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math"&gt;BigInteger&lt;/A&gt; &lt;STRONG&gt;getSizeUsed&lt;/STRONG&gt;()&lt;/PRE&gt;&lt;P&gt;Aggregate bytes &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;used&lt;/FONT&gt;&lt;/STRONG&gt;. This value is not returned if the aggregate is unusable (i.e., it's offline). Range: [0..2^64-1].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AggrListInfoRequest aggrListReq = new AggrListInfoRequest ();&lt;BR /&gt;AggrListInfoResponse aggrListResp = runner.run(aggrListReq);&lt;BR /&gt;&lt;BR /&gt;List&amp;lt;AggrInfo&amp;gt; aggrList = aggrListResp.getAggregates();&lt;BR /&gt;for (AggrInfo aggr : aggrList)&lt;BR /&gt;{&lt;BR /&gt;System.out.println("Aggr Total : "+ aggr.getSizeTotal() ); //not including WAFL&lt;BR /&gt;System.out.println("Aggr Used : "+ aggr.getSizeUsed() );&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Code Outputs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Aggregate Name :&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Aggr1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Aggr Total : &lt;STRONG&gt;43333962539008&lt;/STRONG&gt;&lt;BR /&gt;Aggr Used &amp;nbsp;: &lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;29&lt;/FONT&gt;979080327168&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;Aggregate Name :&amp;nbsp;Aggr2&lt;BR /&gt;Aggr Total : &lt;STRONG&gt;46390407385088&lt;/STRONG&gt;&lt;BR /&gt;Aggr Used &amp;nbsp;: &lt;STRONG&gt;&lt;U&gt;&lt;FONT color="#FF0000"&gt;22&lt;/FONT&gt;164532269056&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comparing this result with the aggr show_space on the filer I get the same for Aggr Total size but both aggr used sizes do not match. Instead, it seems the API is reporting total space allocated instead of used. I guess I can iterate through each volume used data and sum it instead however, &amp;nbsp;the java doc above is a bit misleading.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aggregate 'Aggr1'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total space&lt;/STRONG&gt; WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape&lt;BR /&gt;&lt;STRONG&gt;47020358656KB&lt;/STRONG&gt; 4702035864KB 0KB 42318322792KB 0KB 167585188KB 0KB&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Allocated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;Used &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;Avail&lt;/P&gt;&lt;P&gt;Total space &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;29&lt;/FONT&gt;&lt;/STRONG&gt;107389348KB &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;17&lt;/STRONG&gt;&lt;/FONT&gt;085169132KB 13041879208KB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aggregate 'Aggr2'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total space&lt;/STRONG&gt; WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape&lt;BR /&gt;&lt;STRONG&gt;50336813568KB&lt;/STRONG&gt; 5033681356KB 0KB 45303132212KB 0KB 144534916KB 0KB&lt;/P&gt;&lt;P&gt;Space allocated to volumes in the aggregate&lt;/P&gt;&lt;P&gt;XXXXX&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Allocated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;Used&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Avail&lt;BR /&gt;Total space &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;21&lt;/FONT&gt;&lt;/STRONG&gt;499257532KB &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;14&lt;/FONT&gt;&lt;/STRONG&gt;664465048KB 23658081380KB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2025 05:13:26 GMT</pubDate>
    <dc:creator>MMONTEN01</dc:creator>
    <dc:date>2025-06-05T05:13:26Z</dc:date>
    <item>
      <title>Inccorect aggregate used size output from sdk for java</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Inccorect-aggregate-used-size-output-from-sdk-for-java/m-p/99837#M1334</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying out the sdk to gather info on my filers and ran accross an&amp;nbsp;issue with the output that the 8.1.3 API is returning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From the java docs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;getSizeUsed&lt;/P&gt;&lt;PRE&gt;public &lt;A href="http://download.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" target="_blank" title="class or interface in java.math"&gt;BigInteger&lt;/A&gt; &lt;STRONG&gt;getSizeUsed&lt;/STRONG&gt;()&lt;/PRE&gt;&lt;P&gt;Aggregate bytes &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;used&lt;/FONT&gt;&lt;/STRONG&gt;. This value is not returned if the aggregate is unusable (i.e., it's offline). Range: [0..2^64-1].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AggrListInfoRequest aggrListReq = new AggrListInfoRequest ();&lt;BR /&gt;AggrListInfoResponse aggrListResp = runner.run(aggrListReq);&lt;BR /&gt;&lt;BR /&gt;List&amp;lt;AggrInfo&amp;gt; aggrList = aggrListResp.getAggregates();&lt;BR /&gt;for (AggrInfo aggr : aggrList)&lt;BR /&gt;{&lt;BR /&gt;System.out.println("Aggr Total : "+ aggr.getSizeTotal() ); //not including WAFL&lt;BR /&gt;System.out.println("Aggr Used : "+ aggr.getSizeUsed() );&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Code Outputs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Aggregate Name :&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Aggr1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Aggr Total : &lt;STRONG&gt;43333962539008&lt;/STRONG&gt;&lt;BR /&gt;Aggr Used &amp;nbsp;: &lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;29&lt;/FONT&gt;979080327168&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;Aggregate Name :&amp;nbsp;Aggr2&lt;BR /&gt;Aggr Total : &lt;STRONG&gt;46390407385088&lt;/STRONG&gt;&lt;BR /&gt;Aggr Used &amp;nbsp;: &lt;STRONG&gt;&lt;U&gt;&lt;FONT color="#FF0000"&gt;22&lt;/FONT&gt;164532269056&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comparing this result with the aggr show_space on the filer I get the same for Aggr Total size but both aggr used sizes do not match. Instead, it seems the API is reporting total space allocated instead of used. I guess I can iterate through each volume used data and sum it instead however, &amp;nbsp;the java doc above is a bit misleading.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aggregate 'Aggr1'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total space&lt;/STRONG&gt; WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape&lt;BR /&gt;&lt;STRONG&gt;47020358656KB&lt;/STRONG&gt; 4702035864KB 0KB 42318322792KB 0KB 167585188KB 0KB&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Allocated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;Used &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;Avail&lt;/P&gt;&lt;P&gt;Total space &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;29&lt;/FONT&gt;&lt;/STRONG&gt;107389348KB &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;17&lt;/STRONG&gt;&lt;/FONT&gt;085169132KB 13041879208KB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aggregate 'Aggr2'&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total space&lt;/STRONG&gt; WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape&lt;BR /&gt;&lt;STRONG&gt;50336813568KB&lt;/STRONG&gt; 5033681356KB 0KB 45303132212KB 0KB 144534916KB 0KB&lt;/P&gt;&lt;P&gt;Space allocated to volumes in the aggregate&lt;/P&gt;&lt;P&gt;XXXXX&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Allocated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;Used&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Avail&lt;BR /&gt;Total space &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;21&lt;/FONT&gt;&lt;/STRONG&gt;499257532KB &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;14&lt;/FONT&gt;&lt;/STRONG&gt;664465048KB 23658081380KB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:13:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Inccorect-aggregate-used-size-output-from-sdk-for-java/m-p/99837#M1334</guid>
      <dc:creator>MMONTEN01</dc:creator>
      <dc:date>2025-06-05T05:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inccorect aggregate used size output from sdk for java</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Inccorect-aggregate-used-size-output-from-sdk-for-java/m-p/100615#M1356</link>
      <description>&lt;P&gt;I just look at this on one of our filers and I compared the output of the API call, 'df -Ah' and 'aggr show_space'. What I see is that the API call and 'df' agree on the aggr size and 'used', whereas aggr show_space has a different value for 'used'.&amp;nbsp; I think what's happeneing here is that the API call and df are reporting the 'used' as what has been allocated to volumes, regardless of whether or not there is data taking up that space (perhaps allocated is a better term then used here). 'aggr show_space' is actually giving you a value of how much data is in the aggregate. Now this assume that we're talking about 'think' volumes (guarantee=volume), not sure how this would look if volume guarantees were disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--rdp&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2015 14:36:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Inccorect-aggregate-used-size-output-from-sdk-for-java/m-p/100615#M1356</guid>
      <dc:creator>richard_payne</dc:creator>
      <dc:date>2015-02-13T14:36:36Z</dc:date>
    </item>
  </channel>
</rss>

