PluginCat: tnsping_

File tnsping_, 0.5 kB (added by frankg , 6 years ago)

graph orcale database connectivity with tnsping

Line 
1 #!/bin/sh
2 #
3 #%# family=manual
4
5 ORACLE_HOME=/opt/app/oracle/product/latest
6
7 SID=`basename $0 | sed 's/^tnsping_//g'`
8
9 if [ "$1" = "config" ]; then
10         echo graph_title tnsping times to $SID
11         echo 'graph_args --base 1000 -l 0'
12         echo 'graph_vlabel milliseconds'
13         echo 'graph_category network'
14         echo 'graph_info This graph shows tnsping statistics.'
15         echo "tnsping.label $SID"
16         echo "tnsping.info tnsping statistics for $SID."
17         echo 'tnsping.draw LINE2'
18         exit 0
19 fi
20
21
22 $ORACLE_HOME/bin/tnsping $SID | perl -n -e 'print "tnsping.value ", $1, "\n" if /(\d+) msec\)/;'
23
24
25