temp spaces filling up

temp spaces filling up

Post by tomcam » Sat, 28 Mar 2009 00:09:41


hello all

looking for ideas, scripts, etc on how to do this -

scripts that would trigger when temp space would go low and then run a
snapshot to see what queries were running and how much temp space they
were using.
a nice automatic way to slam the door on the cookie jar while someone
has their hand in there...


we are on version 10 FC9


thanks in advance - Tom\
 
 
 

temp spaces filling up

Post by Art Kage » Sat, 28 Mar 2009 01:11:50

ne option: AGS Sentinel - it can monitor the free space in all of your
dbspaces and send email alerts when it drops below a given threshold.

Another: Run this script every few minutes:

#!/usr/bin/ksh

dbaccess sysmaster - <<EOF
unload to tempfree.unl delimiter " "
select sum(nfree)
from syschunks sc, sysdbspaces sd
where sc.dbsnum = sd.dbsnum
and sd.is_temp = 1
;
EOF
cat tempfree.unl | read freespace rest
if [[ $freespace -lt 1000 ]]; then
mail -s "Tempspace Alert" informix <<EOT
Free temp space is down to: $freespace
EOT
fi


Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors ( XXXX@XXXXX.COM )

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.



On Thu, Mar 26, 2009 at 11:09 AM, XXXX@XXXXX.COM < XXXX@XXXXX.COM >wrote:


One option:AGS Sentinel - it can monitor the free space in all of your dbspaces and send email alerts when it drops below a given threshold<Another:Run this script every few minute<:<><><>r>#!/usr/bin/k<h<><><>r>

dbaccess sysmaster - <<E<F<>r>unload to tempfree.unl delimiter " &quo<;<>r>select sum(nfree< <>r>from syschunks sc, sysdbspaces <d<>r>where sc.dbsnum = sd.dbsn<m<>r> and sd.is_temp =<1<>r<;<>r>E<F<>r>cat tempfree.unl | read freespace re<t<>r>

if [[ $freespace -lt 1000 ]]; th<n<>r> mail -s "Tempspace Alert" informix <<E<T<>r>Free temp space is down to: $freespa<e<>r>E<T<>r><i<><><><>
Art S. Kag<l<>r>Oninit<(www.oninit.c<m<>a<)<>r>

IIUG Board of Directors<(
XXXX@XXXXX.COM <g<>a<)<><><>r>Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. either do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselve<.<>r>
< <>r>< <><><><>