Time for me to ask a stupid question.
I have lots of them...
TSM Server 5.4.3 OS is AIX 5.3
I am trying to utilize the Hourly Monitor in Daily Operational Reporting
to notify me if I reach 90% of maxscratch.
Before I went to the reporting utility, I tried to write a select query.
Only pieces of it work. It seems to be rounding. Obviously I have an
incomplete understanding of something I am trying to use.
I have been nosing around the web and learned some things, but I have
not answered my question.
This is a partial query and the result:
tsm: AIXPROD29>select stgpool_name,numscratchused as "Scratch
Used",maxscratch,cast(numscratchused/maxscratch
as decimal(3,2)) as "PCT MaxScratch" from stgpools where
numscratchused<>0 and maxscratch<>0
STGPOOL_NAME Scratch Used MAXSCRATCH PCT MaxScratch
------------------ ------------ ----------- --------------
COPYTAPE 425 2000 0.00
C_ARCHIVE_TAPE 3 10 0.00
C_DRBACKUP_TAPE 240 1165 0.00
OFFSITE 1432 10000 0.00
ONSITE 4 48 0.00
P_ARCHIVE_TAPE 3 10 0.00
P_DRBACKUP_TAPE 229 300 0.00
P_DRBACKUP_VTL 30 30 1.00
P_NODR_TAPE 32 50 0.00
P_NODR_VTL 14 20 0.00I
It seems to convert anything less than a whole number to the next lower
number
The entire statement yields this result:
tsm: AIXPROD29>select stgpool_name,numscratchused as "Scratch
Used",maxscratch as "Scratch Used",cast(numscrat
chused/maxscratch as decimal(3,2)) as "PCT MaxScratch" from stgpools
where numscratchused<>0 and maxscratch<>0
and cast(numscratchused/maxscratch as decimal(3,2))> .90
STGPOOL_NAME Scratch Used Scratch Used PCT MaxScratch
------------------ ------------ ------------ --------------
P_DRBACKUP_VTL 30 30 1.00
If I deliberatly get the math wrong, I get this result:
tsm: AIXPROD29>select stgpool_name,maxscratch, numscratchused as
"Scratch Used",cast((maxscratch/numscratchuse
d) as decimal(5,2)) as "PCT MaxScratch" from stgpools where
numscratchused<>0 and maxscratch<>0
STGPOOL_NAME MAXSCRATCH Scratch Used PCT MaxScratch
------------------ ----------- ------------ --------------
COPYTAPE 2000 425 4.00
C_ARCHIVE_TAPE 10 3 3.00
C_DRBACKUP_TAPE 1165 240 4.00
OFFSITE 10000 1432 6.00
ONSITE 48 4 12.00
P_ARCHIVE_TAPE 10 3 3.00
P_DRBACKUP_TAPE 300 229 1.00
P_DRBACKUP_VTL 30 30 1.00
P_NODR_TAPE 50 32 1.00
P_NODR_VTL 20 14 1.00
I tried using "float" and got the same results.
2,000/425 is not 4.00, what do I not see?
This may seem basic to you, but I was a printer for years. I have been
paddling in the shallow end of TSM for 2+ years now. I have mostly been
concerned with making my clients (that I can't touch) run.
I visited Richard Sims Quick Facts, but did not see what I was looking
for.
***People are going to ask*** "Why don't you just make maxscratch a huge
number and go home to dinner?"
Two answers:
Someone else set the levels in a low to mid range. We don't currently
collocate so I don't know why...which is the answer, I don't want to
change what I don't fully understand.
The second answer is... I have fallen and I can't get up. This is not
working and I don't know why. I can't let go of it.
IMPORTANT: E-mail sent through the Internet is not secure. Legg Mason
therefore recommends that you do not send any confidential or sensitive
information to us via electronic mail, including social security numbers,
account numbers, or personal identification numbers. Delivery, and or timely
delivery of Internet mail is not guaranteed. Legg Mason therefore recommends
that you do not send time sensitive
or action-oriented messages to us via electronic mail.
This message is intended for the addressee only and may contain privileged or
confidential information. Unless you are the intended recipient, you may not
use, copy or disclose to anyone any information contained in this message. If
you have received this message in error, please notify the author by replying
to this message and then kindly delete the message. Thank you.
|