SELECT
substr(TBSP_NAME,1,40) as tbsp
,TBSP_CONTENT_TYPE
,substr(TBSP_STATE,1,15) as state
,TBSP_PAGE_SIZE/1024 as pagesize
,decimal(float(TBSP_USED_SIZE_KB)/1048576,6,2) as used_size
,decimal(float(TBSP_TOTAL_SIZE_KB)/1048576,6,2) as total_size
from sysibmadm.tbsp_utilization
order by tbsp_used_size_kb desc
db2 select "substr(tbsp_name,1,35) as tbsp_name, tbsp_id, decimal(float(TBSP_PAGE_SIZE*TBSP_USED_PAGES)/1048576,10,2) as used_gb, decimal(float(TBSP_PAGE_SIZE*TBSP_TOTAL_PAGES)/1048576,10,2) as total_gb from table(mon_get_tablespace(NULL,1)) order by 4 desc"
db2 -x select "substr(tbsp_name,1,35) as tbsp_name, tbsp_id, decimal(float(TBSP_PAGE_SIZE*TBSP_USED_PAGES)/1048576,10,2) as used_gb, decimal(float(TBSP_PAGE_SIZE*TBSP_TOTAL_PAGES)/1048576,10,2) as total_gb from table(mon_get_tablespace(NULL,1)) order by 4 desc" | awk 'BEGIN{sum=0}{sum+=$4}END{print sum}'