New monitoring script on Xmonton - db_cpu.ksh
list Andrey Chervonets
Good news.
Had reviewed the script. There may be one problem in that lines:
--
for PROC in $(ps -efa | grep $DB | awk '{ print $2 }')
--
You do just grep, but imagine there may be instances like:
MYDB
MYDB1
MYDB12
or NOMYDB
So it will count MYDB numbers for MYDB1, MYDB12 and NOMYDB too
We should make grepping more intelligent, because oracle processes may
be listed like:
ora_j000_MYDB
oracleMYDB (LOCAL=NO)
ora_ckpt_MYDB
and so on
Best regards,
Andrey Chervonets
CoMinder Ltd.
http://www.cominder.eu/
Mobile: +XXX XXXXXXXX
Fax: +XXX XXXXXXXX
On 01.03.2013 13:00, xymon-request at xymon.com wrote:Message: 10 Date: Fri, 1 Mar 2013 14:40:58 +0800 From: Vernon Everett<user-b3f8dacb72c8@xymon.invalid> To: Xymon mailinglist<xymon at xymon.com> Subject: [Xymon] New monitoring script on Xmonton Message-ID: <user-d01c4f3880d5@xymon.invalid> Content-Type: text/plain; charset="iso-8859-1" Hi all I have just put something together to monitor Oracle database CPU usage. http://www.xymonton.org/monitors:db_cpu.ksh
list Vernon Everett
A good catch, and something I didn't consider. All our databases instances have very different names, so the scenario you describe just never occurred to me. I will have a look at fixing this one when I get back to the office on Tuesday. (Monday is a public holiday here) However, if anybody wants to suggest a fix, or even update the code, go for it. Regards Vernon
▸
On 2 March 2013 17:14, Andrey Chervonets <user-e7fb5c02322c@xymon.invalid> wrote:
Good news. Had reviewed the script. There may be one problem in that lines: -- for PROC in $(ps -efa | grep $DB | awk '{ print $2 }') -- You do just grep, but imagine there may be instances like: MYDB MYDB1 MYDB12 or NOMYDB So it will count MYDB numbers for MYDB1, MYDB12 and NOMYDB too We should make grepping more intelligent, because oracle processes may be listed like: ora_j000_MYDB oracleMYDB (LOCAL=NO) ora_ckpt_MYDB and so on Best regards, Andrey Chervonets CoMinder Ltd. http://www.cominder.eu/ Mobile: +XXX XXXXXXXX Fax: +XXX XXXXXXXX On 01.03.2013 13:00, xymon-request at xymon.com wrote:Message: 10 Date: Fri, 1 Mar 2013 14:40:58 +0800 From: Vernon Everett<everett.vernon at gmail.**com<user-b3f8dacb72c8@xymon.invalid>To: Xymon mailinglist<xymon at xymon.com> Subject: [Xymon] New monitoring script on Xmonton Message-ID:
<CAGo4kcYUaYJ8TSjrs4xf7pNzptsB**3vk3B5omLAae_M-2jtWokg at mail.** gmail.com<user-d01c4f3880d5@xymon.invalid>
▸
Content-Type: text/plain; charset="iso-8859-1" Hi all I have just put something together to monitor Oracle database CPU usage.
http://www.xymonton.org/**monitors:db_cpu.ksh<http://www.xymonton.org/monitors:db_cpu.ksh>;______________________________** Xymon at xymon.com<
-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton
list Vernon Everett
Hi all I have updated this script to fix Andrey's reported bug. I have also added an option to use sar for calculating %Idle, after Nick reminded me that top is not part of a standard install.
▸
Regards
Vernon
On 2 March 2013 20:08, Vernon Everett <user-b3f8dacb72c8@xymon.invalid> wrote:
A good catch, and something I didn't consider. All our databases instances have very different names, so the scenario you describe just never occurred to me. I will have a look at fixing this one when I get back to the office on Tuesday. (Monday is a public holiday here) However, if anybody wants to suggest a fix, or even update the code, go for it. Regards Vernon On 2 March 2013 17:14, Andrey Chervonets <user-e7fb5c02322c@xymon.invalid> wrote:Good news. Had reviewed the script. There may be one problem in that lines: -- for PROC in $(ps -efa | grep $DB | awk '{ print $2 }') -- You do just grep, but imagine there may be instances like: MYDB MYDB1 MYDB12 or NOMYDB So it will count MYDB numbers for MYDB1, MYDB12 and NOMYDB too We should make grepping more intelligent, because oracle processes may be listed like: ora_j000_MYDB oracleMYDB (LOCAL=NO) ora_ckpt_MYDB and so on Best regards, Andrey Chervonets CoMinder Ltd. http://www.cominder.eu/ Mobile: +XXX XXXXXXXX Fax: +XXX XXXXXXXX On 01.03.2013 13:00, xymon-request at xymon.com wrote:Message: 10 Date: Fri, 1 Mar 2013 14:40:58 +0800 From: Vernon Everett<everett.vernon at gmail.**com<user-b3f8dacb72c8@xymon.invalid>To: Xymon mailinglist<xymon at xymon.com> Subject: [Xymon] New monitoring script on Xmonton Message-ID: <CAGo4kcYUaYJ8TSjrs4xf7pNzptsB**3vk3B5omLAae_M-2jtWokg at mail.** gmail.com<user-d01c4f3880d5@xymon.invalid>Content-Type: text/plain; charset="iso-8859-1" Hi all I have just put something together to monitor Oracle database CPU usage. http://www.xymonton.org/**monitors:db_cpu.ksh<http://www.xymonton.org/monitors:db_cpu.ksh>;______________________________** Xymon at xymon.com<-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton
-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton
list Ryan Novosielski
Curious -- what platforms don't have top? I know that Solaris doesn't have it, but it still has prstat. Sorry for the off-topic stray.
▸
From: Vernon Everett [mailto:user-b3f8dacb72c8@xymon.invalid] Sent: Wednesday, March 06, 2013 07:50 PM To: Andrey Chervonets <user-e7fb5c02322c@xymon.invalid> Cc: xymon at xymon.com <xymon at xymon.com> Subject: Re: [Xymon] New monitoring script on Xmonton - db_cpu.ksh Hi all I have updated this script to fix Andrey's reported bug. I have also added an option to use sar for calculating %Idle, after Nick reminded me that top is not part of a standard install. Regards Vernon On 2 March 2013 20:08, Vernon Everett <user-b3f8dacb72c8@xymon.invalid<mailto:user-b3f8dacb72c8@xymon.invalid>> wrote: A good catch, and something I didn't consider. All our databases instances have very different names, so the scenario you describe just never occurred to me. I will have a look at fixing this one when I get back to the office on Tuesday. (Monday is a public holiday here) However, if anybody wants to suggest a fix, or even update the code, go for it. Regards Vernon On 2 March 2013 17:14, Andrey Chervonets <user-e7fb5c02322c@xymon.invalid<mailto:user-e7fb5c02322c@xymon.invalid>> wrote: Good news. Had reviewed the script. There may be one problem in that lines: -- for PROC in $(ps -efa | grep $DB | awk '{ print $2 }') -- You do just grep, but imagine there may be instances like: MYDB MYDB1 MYDB12 or NOMYDB So it will count MYDB numbers for MYDB1, MYDB12 and NOMYDB too We should make grepping more intelligent, because oracle processes may be listed like: ora_j000_MYDB oracleMYDB (LOCAL=NO) ora_ckpt_MYDB and so on Best regards, Andrey Chervonets CoMinder Ltd. http://www.cominder.eu/
Mobile: +XXX XXXXXXXX<tel:%2B371%2026517848>
Fax: +XXX XXXXXXXX<tel:%2B371%2066066346>
▸
On 01.03.2013 13:00, xymon-request at xymon.com<mailto:xymon-request at xymon.com> wrote:
Message: 10
Date: Fri, 1 Mar 2013 14:40:58 +0800
From: Vernon Everett<user-b3f8dacb72c8@xymon.invalid<mailto:user-b3f8dacb72c8@xymon.invalid>>
To: Xymon mailinglist<xymon at xymon.com<mailto:xymon at xymon.com>>
Subject: [Xymon] New monitoring script on Xmonton
Message-ID:
<user-d01c4f3880d5@xymon.invalid<mailto:user-d01c4f3880d5@xymon.invalid>>
▸
Content-Type: text/plain; charset="iso-8859-1" Hi all I have just put something together to monitor Oracle database CPU usage. http://www.xymonton.org/monitors:db_cpu.ksh -- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton -- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton
list Mike Burger
AIX doesn't have top. It does have topas, but the output isn't particularly top-like. Sent from my iPhone...please excuse any typos or short answers. It's always suicide-mission this save-the-planet that. No one ever stops by just to say hi anymore. -Col. Jack O'Neill
▸
On Mar 6, 2013, at 9:00 PM, "Novosielski, Ryan" <user-ae4522577e16@xymon.invalid> wrote:
Curious -- what platforms don't have top? I know that Solaris doesn't have it, but it still has prstat. Sorry for the off-topic stray. From: Vernon Everett [mailto:user-b3f8dacb72c8@xymon.invalid] Sent: Wednesday, March 06, 2013 07:50 PM To: Andrey Chervonets <user-e7fb5c02322c@xymon.invalid> Cc: xymon at xymon.com <xymon at xymon.com> Subject: Re: [Xymon] New monitoring script on Xmonton - db_cpu.ksh Hi all I have updated this script to fix Andrey's reported bug. I have also added an option to use sar for calculating %Idle, after Nick reminded me that top is not part of a standard install. Regards Vernon On 2 March 2013 20:08, Vernon Everett <user-b3f8dacb72c8@xymon.invalid> wrote:A good catch, and something I didn't consider. All our databases instances have very different names, so the scenario you describe just never occurred to me. I will have a look at fixing this one when I get back to the office on Tuesday. (Monday is a public holiday here) However, if anybody wants to suggest a fix, or even update the code, go for it. Regards Vernon On 2 March 2013 17:14, Andrey Chervonets <user-e7fb5c02322c@xymon.invalid> wrote:Good news. Had reviewed the script. There may be one problem in that lines: -- for PROC in $(ps -efa | grep $DB | awk '{ print $2 }') -- You do just grep, but imagine there may be instances like: MYDB MYDB1 MYDB12 or NOMYDB So it will count MYDB numbers for MYDB1, MYDB12 and NOMYDB too We should make grepping more intelligent, because oracle processes may be listed like: ora_j000_MYDB oracleMYDB (LOCAL=NO) ora_ckpt_MYDB and so on Best regards, Andrey Chervonets CoMinder Ltd. http://www.cominder.eu/ Mobile: +XXX XXXXXXXX Fax: +XXX XXXXXXXX On 01.03.2013 13:00, xymon-request at xymon.com wrote:Message: 10 Date: Fri, 1 Mar 2013 14:40:58 +0800 From: Vernon Everett<user-b3f8dacb72c8@xymon.invalid> To: Xymon mailinglist<xymon at xymon.com> Subject: [Xymon] New monitoring script on Xmonton Message-ID: <user-d01c4f3880d5@xymon.invalid> Content-Type: text/plain; charset="iso-8859-1" Hi all I have just put something together to monitor Oracle database CPU usage. http://www.xymonton.org/monitors:db_cpu.ksh-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton
CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure, alteration or distribution is strictly prohibited and may violate state or federal law. If you are not the intended recipient, please contact the sender by reply e-mail, delete this email and destroy all copies of the message.
list Vernon Everett
Hi all Made some updates to the db_cpu script. It can now cope with the situation where there are no databases running. Previously, it would simply exit if it found nothing. Now it reports it, and can trigger an alert if you configure it so. Regards Vernon
▸
On 7 March 2013 08:50, Vernon Everett <user-b3f8dacb72c8@xymon.invalid> wrote:
Hi all I have updated this script to fix Andrey's reported bug. I have also added an option to use sar for calculating %Idle, after Nick reminded me that top is not part of a standard install. Regards Vernon On 2 March 2013 20:08, Vernon Everett <user-b3f8dacb72c8@xymon.invalid> wrote:A good catch, and something I didn't consider. All our databases instances have very different names, so the scenario you describe just never occurred to me. I will have a look at fixing this one when I get back to the office on Tuesday. (Monday is a public holiday here) However, if anybody wants to suggest a fix, or even update the code, go for it. Regards Vernon On 2 March 2013 17:14, Andrey Chervonets <user-e7fb5c02322c@xymon.invalid>wrote:Good news. Had reviewed the script. There may be one problem in that lines: -- for PROC in $(ps -efa | grep $DB | awk '{ print $2 }') -- You do just grep, but imagine there may be instances like: MYDB MYDB1 MYDB12 or NOMYDB So it will count MYDB numbers for MYDB1, MYDB12 and NOMYDB too We should make grepping more intelligent, because oracle processes may be listed like: ora_j000_MYDB oracleMYDB (LOCAL=NO) ora_ckpt_MYDB and so on Best regards, Andrey Chervonets CoMinder Ltd. http://www.cominder.eu/ Mobile: +XXX XXXXXXXX Fax: +XXX XXXXXXXX On 01.03.2013 13:00, xymon-request at xymon.com wrote:Message: 10 Date: Fri, 1 Mar 2013 14:40:58 +0800 From: Vernon Everett<everett.vernon at gmail.**com<user-b3f8dacb72c8@xymon.invalid>To: Xymon mailinglist<xymon at xymon.com> Subject: [Xymon] New monitoring script on Xmonton Message-ID: <CAGo4kcYUaYJ8TSjrs4xf7pNzptsB**3vk3B5omLAae_M-2jtWokg at mail.** gmail.com<user-d01c4f3880d5@xymon.invalid>Content-Type: text/plain; charset="iso-8859-1" Hi all I have just put something together to monitor Oracle database CPU usage. http://www.xymonton.org/**monitors:db_cpu.ksh<http://www.xymonton.org/monitors:db_cpu.ksh>;______________________________** Xymon at xymon.com<-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton
-- "Accept the challenges so that you can feel the exhilaration of victory" - General George Patton