#!/bin/sh
su - oracle -c "/u01/app/oracle/product/9.2.0/bin/tnsping $1" |tail -1 \
|awk '{if ($1=="OK") {ms=(substr($(NF-2),1)); \
printf ("ScriptRes:Ok:%d ms\n",ms)} else {printf ("ScriptRes:Bad:%d ms\n",ms)};exit}'
Oracle TNSping test shell script for Redhat Linux AS 3
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Script is designed for "Shell Script" test method ( http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell )and should be performed by "RMA for *nix".Nadir wrote:How this script works?
http://www.ks-soft.net/hostmon.eng/rma-unix/index.htm
Script executes tnsping utility with TNS alias, passed as parameter, checks the last line of the output (tail -1) and takes the response time.
Corect.Nadir wrote:Is this script required just TNS alias?
Regards,
Max