Changes between Version 1 and Version 2 of drmsAscertainSpace


Ignore:
Timestamp:
03/25/14 12:49:01 (11 years ago)
Author:
niles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • drmsAscertainSpace

    v1 v2  
    11 
    2 Ascertaining how much disk space a series uses 
     2 = Ascertaining how much disk space a series uses = 
    33 
    44The first thing to do is to go into the SUMS database and build a temporary table (lasts only for the current session) with storage information : 
    55 
     6{{{ 
    67create temporary table space_used as ( select sum(bytes) as bytes, owning_series from sum_main group by owning_series ); 
     8}}} 
    79 
    810The resulting table looks something like this : 
    911 
     12{{{ 
    1013     bytes      | owning_series 
    1114----------------+--------------- 
     
    1417  2604818885633 | hmi.s_720s 
    1518 34888439851665 | aia.lev1 
     19}}} 
    1620 
    1721The creation of this table can take a while. 
    1822 
    19 Then we need to do a sum through that table of storage for series name(s) that match what we want (and convert to GB) - for instance : 
     23Then we need to do a sum through that table of storage for series name(s) that match what we want (and convert to GB) - for instance, for data in the hmi series : 
    2024 
     25{{{ 
    2126select sum(bytes)/1024/1024/1024 as HMI_GB from space_used where owning_series like 'hmi%'; 
    2227       hmi_gb 
     
    2429 51440.777539771982 
    2530(1 row) 
     31}}} 
    2632 
     33And for data in the AIA series : 
    2734 
     35{{{ 
    2836select sum(bytes)/1024/1024/1024 as AIA_GB from space_used where owning_series like 'aia%'; 
    2937       aia_gb 
     
    3139 47510.095782309771 
    3240(1 row) 
     41}}} 
    3342 
    34