Select node_name,sum(physical_MB) from occupancy group by node_name Would seem to give you the total usage for each of you nodes. If you don't want to count copypools, Select node_name,sum(physical_MB) from occupancy where stgpool_name in (select stgpool_name from stgpools where pooltype='PRIMARY) group by node_name
73, Tim Conway JBS USA | 1770 Promontory Ci | Greeley, CO 80634| USA Direct: 970-506-7998 | Fax: 970.336.6195 email: [email protected] JBS Server Team -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[email protected]] On Behalf Of Avy Wong Sent: Tuesday, August 10, 2010 1:50 PM To: [email protected] Subject: [ADSM-L] which one is more accurate count? Hi tsm experts, In order to get an accurate count of the storage capacity used by all the nodes, I thought if I go about using select statement #1, I get the storage usage of from each storage pool, add them up, will get me an accurate count or rather simply run # 2 will do the job? 1) select vu.node_name, ao.total_mb, count(distinct vu.volume_name) as tapes, ao.total_mb/count(distinct vu.volume_name) as "AVG MB/tape" from volumeusage vu, auditocc ao where vu.stgpool_name='YOUR_POOL_NAME' and vu.node_name=ao.node_name group by vu.node_name, ao.total_mb order by 4 2) select filespaces.node_name,sum(PCT_UTIL * CAPACITY/100) as "TOTAL_CAPACITY(MB)" from filespaces group by filespaces.node_name order by "NODE_NAME"" Avy Wong Business Continuity Administrator Mohegan Sun 1 Mohegan Sun Blvd Uncasville, CT 06382 (860)862-8164 (cell) (860)961-6976 The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copy of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.
