Module: check_mk
Branch: master
Commit: 8da6d2ccb7e379d059f39bd2445daf4d167cccfe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8da6d2ccb7e379…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 23 12:08:51 2011 +0100
FIX: Updated tamblespace query to handle temp tablespaces correctly
---
agents/plugins/mk_oracle | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/agents/plugins/mk_oracle b/agents/plugins/mk_oracle
index e6ad4a2..e66dc53 100644
--- a/agents/plugins/mk_oracle
+++ b/agents/plugins/mk_oracle
@@ -68,12 +68,10 @@ do
sqlplus "$SID" <<EOF | sed 's/READ ONLY/READONLY/g'
select f.file_name, f.tablespace_name, f.status, f.AUTOEXTENSIBLE, f.blocks, f.maxblocks,
f.blocks - b.free_blocks as used_blocks, f.INCREMENT_BY, f.ONLINE_STATUS, t.BLOCK_SIZE,
t.status
from dba_data_files f, dba_tablespaces t ,(SELECT file_id, SUM(blocks) free_blocks FROM
dba_free_space b GROUP BY file_id) b
-where f.tablespace_name = t.tablespace_name
-and f.file_id=b.file_id
+where f.tablespace_name = t.tablespace_name and f.file_id=b.file_id
UNION
-select f.file_name, f.tablespace_name, f.status, f.AUTOEXTENSIBLE, f.blocks, f.maxblocks,
f.blocks - b.free_blocks as used_blocks, f.INCREMENT_BY, 'TEMP', t.BLOCK_SIZE,
t.status
-from dba_temp_files f, dba_tablespaces t ,(SELECT file_id, SUM(blocks) free_blocks FROM
dba_free_space b GROUP BY file_id) b
-where f.tablespace_name = t.tablespace_name
-and f.file_id=b.file_id ;
+select f.file_name, f.tablespace_name, f.status, f.AUTOEXTENSIBLE, f.blocks, f.maxblocks,
f.blocks - b.blocks_used as used_blocks, f.INCREMENT_BY, 'TEMP', t.BLOCK_SIZE,
t.status
+from dba_temp_files f, dba_tablespaces t ,V\$TEMP_SPACE_HEADER b
+where f.tablespace_name = t.tablespace_name and f.file_id=b.file_id ;
EOF
done