Does this do what you want?
tsm: ULTSM>q script q_stgsum f=l
Name Line Command
Number
---------- ------ ------------------------------------------------------------
Q_STGSUM 1 select stgpool_name, -
5 devclass, -
10 maxscratch, -
15 numscratchused, -
20 cast(maxscratch-numscratchused as decimal(4,0)) as
"SCR_AVAIL" -
25 from stgpools -
30 where stgpool_name like '%VTL' -
35 order by devclass,stgpool_name
>>> "Lee, Gary D." <GLEE AT BSU DOT EDU> 4/6/2010 3:10 PM >>>
Tsm server 5.5.4 running on suse 9 linux under zvm 5.3.
Trying to create a query which will give me the count of volumes in a storage
pool, and its maxscratch setting on a single line.
Nice to watch for filling pools which need a larger maxscratch value.
Query follows:
---------------
select a.stgpool_name as "Storage Pool Name", -
a.devclass as "Device Class Name", -
count( b.volume_name) as " # VOLUMES", -
a.maxscratch as "volumes available" -
from stgpools a, volumes b -
where a.devclass <>'DISK' -
and a.devclass = b.devclass_name -
group by a.stgpool_name, a.devclass
--------- query ends. ------------
Thanks for any help.
Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310
|