On Wed, Feb 05, 2003 at 10:31:03AM -0500, Theresa Sarver wrote:
> Hi all;
>
> Does anyone have a script that calculates the total spaced used per node (and
> possibly per stg pool)?
>
> Thank you;
> Theresa
Here are some selects I run in my daily tsm reports
# list number of files and used storage per node, sorted by used storage
select node_name,
sum(num_files) as NUM_FILES,
sum(logical_mb) as STORAGE_MB,
sum(physical_mb) as TOTAL_MB
from occupancy
where stgpool_name <> 'COPYPOOL'
group by node_name
order by storage_mb desc
# list number of files and used storage per node, sorted by number of files
select node_name,
sum(num_files) as NUM_FILES,
sum(logical_mb) as STORAGE_MB
from occupancy
where stgpool_name <> 'COPYPOOL'
group by node_name
order by num_files desc
# total number of files backed up and used storage in primary pools
select sum(num_files)/1000 as "NUM_FILES x 1000",
sum(logical_mb)/1024 as STORAGE_GB,
sum(physical_mb)/1024 as TOTAL_GB
from occupancy
where stgpool_name <> 'COPYPOOL'
# Storage and used files per storage pool
select node_name,
stgpool_name,
sum(num_files) as NUM_FILES,
sum(logical_mb) as STORAGE_MB,
sum(physical_mb) as TOTAL_MB
from occupancy
group by node_name, stgpool_name
order by node_name, stgpool_name
-Marcel
--
======-------- Marcel J.E. Mol MESA Consulting B.V.
=======--------- ph. +31-(0)6-54724868 P.O. Box 112
=======--------- marcel AT mesa DOT nl 2630 AC
Nootdorp
__==== www.mesa.nl ---____U_n_i_x______I_n_t_e_r_n_e_t____ The Netherlands ____
They couldn't think of a number, Linux user 1148 -- counter.li.org
so they gave me a name! -- Rupert Hine -- www.ruperthine.com
|