Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4401Themes and Skins13Add-ons756Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Configuration Wizards DHCP Nagios XI Monitoring Wizard
0.0 (0)
115.4K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)Julien DESMAREST (6)Davide Lemma (4)deskwork_itunes142 (4)Chad Columbus (3)
See More
Newest Contributors
signalgrid (1)Sanna Glue (2)fisherrs (1)smolinux (1)juanfertor (1)
See More

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > vegatripy
v

vegatripy

@vegatripy

User Stats

Member Since: August 11, 2015

Favorites0

Views

Projects0

No Projects Found
check_oracle_tablespace

Update with this query

The problem with the original query is if you have a tablespace with mixed autoextend and fixed size datafiles (it's rare, but it's possible). If you want to fix it, you can replace the query from lines 247 to 282 with this one that I've made: select z.TABLESPACE_NAME, round(((Mbytes_used - Mbytes_free) / Mbytes_used) * 100) usage_pct, round(decode(MAXMBYTES, 34359721984, 0, (Mbytes_used - Mbytes_free) / MAXMBYTES * 100)) max_pct, case when (select count(distinct AUTOEXTENSIBLE) from dba_data_files where TABLESPACE_NAME = z.TABLESPACE_NAME) > 1 then 'YES/NO' else (select distinct AUTOEXTENSIBLE from dba_data_files where TABLESPACE_NAME = z.TABLESPACE_NAME) end as AUTOEXTENSIBLE from ( select TABLESPACE_NAME, sum (Mbytes_used) Mbytes_used, sum (Mbytes_free) Mbytes_free, sum (MAXMBYTES) MAXMBYTES from ( select substr(df.TABLESPACE_NAME,1,length(df.TABLESPACE_NAME)-4) TABLESPACE_NAME, df.BYTES/1024/1024 Mbytes_used, nvl(fs.BYTES/1024/1024, 0) Mbytes_free, df.MAXBYTES/1024/1024 MAXMBYTES, df.AUTOEXTENSIBLE from ( select TABLESPACE_NAME||LPAD(FILE_ID,4,0) TABLESPACE_NAME, sum(BYTES) BYTES, AUTOEXTENSIBLE, decode(AUTOEXTENSIBLE, 'YES', sum(MAXBYTES), sum(BYTES)) MAXBYTES from dba_data_files group by TABLESPACE_NAME||LPAD(FILE_ID,4,0), AUTOEXTENSIBLE ) df LEFT OUTER JOIN ( select a.TABLESPACE_NAME||LPAD(FILE_ID,4,0) TABLESPACE_NAME, sum(a.BYTES) BYTES from dba_free_space a group by TABLESPACE_NAME||LPAD(FILE_ID,4,0) ) fs ON df.TABLESPACE_NAME=fs.TABLESPACE_NAME order by df.TABLESPACE_NAME desc ) a group by TABLESPACE_NAME ) z order by 1 asc /

Reviewed 11 years ago

No Favorites Found

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile