Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Help in unix script
Hi Ashoke,
I see that you are using NORAD (I am the resident NORAD sales critter ;P).
Can't help you much on the script help, but one thing I can say:
Have you looked at the IAS agent of NORAD (the system monitoring agent)? This will be able to do all that you want..
Under the standard rules (just the same as you see when using NORAD against Oracle) there is an IAS rule called IAS_PROCESSES_KMEM_USAGE (Interval KMem usage exceeds value) that will flag exactly what you want. Then all you have to do is generate an event handler for that rule that will email you the results.. If you want it to just run against the NORAD processes, copy the rule, and edit the where clause to also include "and command like "dbg%""..
You could also use the Process Monitor built in to the IAS agent, to group the DBGXXX agents together to monitor the NORAD program as a "group"..
What version are you running, and what O/S are you running this against? You
may want to get in touch with your local supplier (whoever that is) to talk
about IAS. Alternatively, get in touch with me back channel
(mark_at_cool-tools.co.uk) and I'll see if I can help you out (we are
Bradmark's No.1 distributor worldwide..). I won't be able to supply the
agents (that's best left to your local supplier), but I can point you in the
right direction..
HTH Mark
Mark Leith | T: +44 (0)1905 330 281 Sales & Marketing | F: +44 (0)870 127 5283 Cool Tools UK Ltd | E: mark_at_cool-tools.co.uk =================================================== http://www.cool-tools.co.uk Maximising throughput & performance
-----Original Message-----
Ashoke
Sent: 28 March 2002 16:28
To: Multiple recipients of list ORACLE-L
Greetings all,
I need to do the following
unix> top -b -U norad
PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
12733 norad 1 60 2 3936K 3392K run 0:05 7.21% dbganlz 12747 norad 4 52 2 13M 10M sleep 0:05 4.20% dbgora 12721 norad 1 53 2 3160K 2584K sleep 0:00 0.12% dbgsam 12726 norad 1 52 2 3184K 2416K sleep 0:00 0.02% dbgalert 12740 norad 1 53 2 2992K 2128K sleep 0:00 0.02% dbgrepos 12594 norad 1 59 0 3200K 2544K sleep 0:00 0.01% dbgsam 12606 norad 1 59 0 4696K 4160K sleep 0:11 0.00% dbganlz 12620 norad 4 59 0 42M 13M sleep 0:06 0.00% dbgora 12599 norad 1 58 0 3216K 2400K sleep 0:00 0.00% dbgalert 12613 norad 1 59 0 3016K 2112K sleep 0:00 0.00% dbgrepos
I have to check the last character of SIZE column. If the size is in M(megabyte) then check if the value is > 40 then send an e-mail with the COMMAND name and the size. Something like "dbgora has a size of 42M"
I was trying the following script. But I am not sure how to get the last character of SIZE column from the above output and compare with 'M' and then compare with the value.
top -b -U norad | grep norad | awk '{ print $6, $11 }' | \
while read SIZE COMMAND
do
echo "Command : $COMMAND Size : $SIZE"
done
Any suggestions will be appreciated.
Thanks,
Ashoke
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mandal, Ashoke INET: ashoke.k.mandal_at_medtronic.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Thu Mar 28 2002 - 12:28:28 CST
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Mark Leith INET: mark_at_cool-tools.co.uk Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).