Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> awk question
Can someone please fill me in on if and how I can use the commented out
threshhold variables(after uncommenting) and reference those variables in
my awk test/evaluation in place of the hardcoded values($10 > 55 or 65).
Thanks
- David
#!/bin/ksh
SID=$1
cd /m1/homes/oracle
. ./$SID
#export WARNING_THRESHHOLD=55
#export CRITICAL_THRESHHOLD=65
export TBS_WARNING=`orastat -ts | awk '{if ($10 > 55) print $10}' | grep
-vi generic | grep -vi pct | grep -vi === | gr
ep -vi listed | grep -vi accurat`
export TBS_CRITICAL=`orastat -ts | awk '{if ($10 > 65) print $10}' | grep
-vi generic | grep -vi pct | grep -vi === | g
rep -vi listed | grep -vi accurat`
echo $TBS_WARNING
echo $TBS_CRITICAL
if [ $TBS_CRITICAL -gt 65 ]; then
./orastat -ts|mailx -s "TBS CRITICAL for $SID" dgreen_at_soe.sony.com elif [ $TBS_WARNING -gt 55 ]; then
./orastat -ts|mailx -s "TBS WARNING for $SID" dgreen_at_soe.sony.com fi
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Tue Jun 08 2004 - 18:08:05 CDT
![]() |
![]() |