title: Sharepoint 2010 Subsite/Document Library/Lists Storage Data
body: <p>Basically all I want to do is to get the <em>total</em> storage space of subsites, document libraries and lists within a site collection. There does not seem to be a possible way to do it besides:</p>
  
  <ol>
  <li>using <code>site.StorageManagementInformation</code> which is currently Obsolete</li>
  <li><p><code>SPSite.UsageInfo</code> this can only work for site collection:</p>
  
  <pre><code>SPSite.UsageInfo usageInfo = spSite.Usage;
  long storageUsed = usageInfo.Storage;
  </code></pre></li>
  <li><p><code>SPWeb.GetUsageData</code> which only gets the current day(and up to the last 31 days) usage data.</p></li>
  <li><p>finding the database table where Site Collection Administration > Storage Metrics is querying from (which I could not find even with using a .NET Reflector for the assembly)</p></li>
  </ol>
  
  <p>If anyone has any other way or idea on how to achieve this it would be very much appreciated!</p>