summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-10-26 21:10:20 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2006-10-26 21:10:20 +0000
commit94a3cf91b3548388a9b278273ac596203a4a9e75 (patch)
tree6dc4b4c1e036974e190547be391533425c2870a1
parent6728e60669cfa3011e5ab5f3315feccd6205668d (diff)
downloadmonitoring-plugins-94a3cf91b3548388a9b278273ac596203a4a9e75.tar.gz
Fixed error if dba_free_space has no free segments (Florian Gleixner)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1529 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--THANKS.in1
-rwxr-xr-xplugins-scripts/check_oracle.sh7
2 files changed, 5 insertions, 3 deletions
diff --git a/THANKS.in b/THANKS.in
index 2e0ad4b8..591ae545 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -199,3 +199,4 @@ Craig Orsinger
199Robby Giffin 199Robby Giffin
200Henning Schmiedehausen 200Henning Schmiedehausen
201Markus Baertschi 201Markus Baertschi
202Florian Gleixner
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index 99564917..02ca1114 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -244,13 +244,14 @@ EOF`
244 result=`sqlplus -s ${3}/${4}@${2} << EOF 244 result=`sqlplus -s ${3}/${4}@${2} << EOF
245set pagesize 0 245set pagesize 0
246set numf '9999999.99' 246set numf '9999999.99'
247select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc 247select NVL(b.free,0.0),a.total,100 - trunc(NVL(b.free,0.0)/a.total * 1000) / 10 prc
248from ( 248from (
249select tablespace_name,sum(bytes)/1024/1024 total 249select tablespace_name,sum(bytes)/1024/1024 total
250from dba_data_files group by tablespace_name) A, 250from dba_data_files group by tablespace_name) A
251LEFT OUTER JOIN
251( select tablespace_name,sum(bytes)/1024/1024 free 252( select tablespace_name,sum(bytes)/1024/1024 free
252from dba_free_space group by tablespace_name) B 253from dba_free_space group by tablespace_name) B
253where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; 254ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}';
254EOF` 255EOF`
255 256
256 if [ -n "`echo $result | grep ORA-`" ] ; then 257 if [ -n "`echo $result | grep ORA-`" ] ; then