Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/oracle/oracle-sga | ||
|---|---|---|
| 7 | 7 |
# Version: 1.0 |
| 8 | 8 |
# |
| 9 | 9 |
# This program is free software; you can redistribute it and/or modify |
| 10 |
# it under the terms of the GNU General Public License version 2
|
|
| 10 |
# it under the terms of the GNU General Public License version 2 |
|
| 11 | 11 |
# as published by the Free Software Foundation. |
| 12 |
#
|
|
| 12 |
# |
|
| 13 | 13 |
# This program is distributed in the hope that it will be useful, |
| 14 | 14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | 15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | 16 |
# GNU General Public License for more details. |
| 17 |
#
|
|
| 17 |
# |
|
| 18 | 18 |
# You should have received a copy of the GNU General Public License along |
| 19 | 19 |
# with this program; if not, write to the Free Software Foundation, Inc., |
| 20 | 20 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 |
#
|
|
| 21 |
# |
|
| 22 | 22 |
# |
| 23 | 23 |
# Prerequistes: |
| 24 | 24 |
# 1) env.ORACLE_HOME set in munin-node |
| ... | ... | |
| 43 | 43 |
# dbport : port used by the monitored instance (notice: numeric value) |
| 44 | 44 |
# dbname : database to be monitored |
| 45 | 45 |
# dbhost : host or ip address of db instance |
| 46 |
#
|
|
| 46 |
# |
|
| 47 | 47 |
# |
| 48 | 48 |
#%# family=auto |
| 49 | 49 |
#%# capabilities=autoconf |
| ... | ... | |
| 71 | 71 |
# |
| 72 | 72 |
# Queries |
| 73 | 73 |
# |
| 74 |
shared_pool_query = "SELECT TO_CHAR(ROUND(SUM(decode(pool, 'shared pool',
|
|
| 74 |
shared_pool_query = "SELECT TO_CHAR(ROUND(SUM(decode(pool, 'shared pool', |
|
| 75 | 75 |
decode(name, 'library cache',0, |
| 76 | 76 |
'dictionary chace',0, |
| 77 | 77 |
'free memory',0, |
| ... | ... | |
| 96 | 96 |
|
| 97 | 97 |
log_buffer_query = "SELECT TO_CHAR(ROUND(SUM(decode(pool, NULL, |
| 98 | 98 |
decode(name, 'log_buffer', (bytes)/(1024*1024),0),0)),2)) sga_lbuffer |
| 99 |
from V$SGASTAT"
|
|
| 99 |
from V$SGASTAT" |
|
| 100 | 100 |
|
| 101 | 101 |
|
| 102 | 102 |
memory_components = { "fixed_area" => fixed_area_query,
|
| ... | ... | |
| 122 | 122 |
# config definition |
| 123 | 123 |
# |
| 124 | 124 |
elsif ARGV[0] == "config" |
| 125 |
puts "graph_args --base 1024k -r --lower-limit 0"
|
|
| 125 |
puts "graph_args --base 1024k -r --lower-limit 0" |
|
| 126 | 126 |
puts "graph_title Oracle SGA from #{dbname}"
|
| 127 | 127 |
puts "graph_category db" |
| 128 | 128 |
puts "graph_info This graph shows the SGA memory usage (in MB)" |
| ... | ... | |
| 138 | 138 |
# make sure fixed_area is at the bottom of the stack |
| 139 | 139 |
if ( m == 'fixed_area' ) |
| 140 | 140 |
puts "#{m}.draw AREA"
|
| 141 |
else
|
|
| 141 |
else |
|
| 142 | 142 |
puts "#{m}.draw STACK"
|
| 143 | 143 |
end |
| 144 | 144 |
end |
Formats disponibles : Unified diff