Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get the client to know the addon is there?
Thanks Stefan
Tail end of this page: http://hobbitmon.sourceforge.net/docs/hobbit-tips.html
On 11/6/07, Stefan van der Walt <skjoldar at gmail.com> wrote:
Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get the client to know the addon is there?
Thanks Stefan
-- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
Hi Stefan
If by Roracle you refer to bb-roracle script available from deadcat, then yes, I have used it. (This contract, a few years back. Still have the scripts and ksh binary) Damn useful, once you get it working. Gave some good info. I don't think it did any graphing, but I may be wrong.
The problem I encountered had to do with the subtle differences between different implementations of ksh. I suspect this is where you are getting stuck too. Yes, ksh differs from one version to the next, and the implementation I had on my server (Solaris Sparc) was just never going to work.
Eventually, I got so fed up, I downloaded a different version of ksh, and put it in the ~hobbit directory structure, and changed the #! line to point to the new ksh. It was a horrible fix, but the best I could do under the circumstances. :-(
If you are running Solaris on Sparc, I can send you what I have, but if you on a different architechture and OS, you are pretty much on your own.
Cheers V
From: Stefan van der Walt [mailto:skjoldar at gmail.com] Sent: Tuesday, 6 November 2007 10:18 PM To: hobbit at hswn.dk Subject: [hobbit] Roracle
Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get the client to know the addon is there?
Thanks Stefan
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
Hi sir!
I'm running oracle on solaris sparc. Could you please help me make it work. Right now I'm still monitoring tablespace manually because I was not able to implement it with hobbit. Please make the procedure as simple as possible because I have limited knowledge in oracle.
Thank you very much! Ryan ----- Original Message ----- From: Everett, Vernon To: hobbit at hswn.dk Sent: Wednesday, November 07, 2007 7:38 AM Subject: RE: [hobbit] Roracle
Hi Stefan
If by Roracle you refer to bb-roracle script available from deadcat, then yes, I have used it. (This contract, a few years back. Still have the scripts and ksh binary) Damn useful, once you get it working. Gave some good info. I don't think it did any graphing, but I may be wrong.
The problem I encountered had to do with the subtle differences between different implementations of ksh. I suspect this is where you are getting stuck too. Yes, ksh differs from one version to the next, and the implementation I had on my server (Solaris Sparc) was just never going to work.
Eventually, I got so fed up, I downloaded a different version of ksh, and put it in the ~hobbit directory structure, and changed the #! line to point to the new ksh. It was a horrible fix, but the best I could do under the circumstances. :-(
If you are running Solaris on Sparc, I can send you what I have, but if you on a different architechture and OS, you are pretty much on your own.
Cheers V
From: Stefan van der Walt [mailto:skjoldar at gmail.com] Sent: Tuesday, 6 November 2007 10:18 PM To: hobbit at hswn.dk Subject: [hobbit] Roracle
Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get the client to know the addon is there?
Thanks Stefan
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
Hi Ryan
First off, please don't call me "sir". I am neither a knight of the realm, nor a military officer, and damn proud of it. :-)
I have two Oracle tools. The first one, ora-alert is a simple script I cobbled together to monitor the alert logs. You set it up to run on the client as documented in the Hobbit help pages, and it needs an alert log tab file called $BBHOME/etc/alert_log.tab This needs to contain the Oracle SID and the alert log file. It will go yellow whenever an ORA error is generated, and red for an ORA-00600 (Feel free to modify as required) Output on the Hobbit detailed view will include the log entry. Pretty simple, and so short, I include it below.
The other is a very comprehensive database monitor, which is a slightly modified bb-roracle script (Unfortunately, I had many problems getting bb-roracle to run with the default Solaris version of ksh, and had to modify the script quite a bit.) I downloaded a different version of ksh, which I have unfortunately no longer have - despite what I said in an earlier mail :-( I also do not remember what version it was. You can put any new ksh binary anywhere you want, as long as the #! entry on the first line of your script points to it.
However, on looking again, I think the original roracle was designed to work with pdksh, available here http://web.cs.mun.ca/~michael/pdksh/ My reason for thinking this is this piece of code in bb-roracle, #cat $BBTMP/TABLESPACE.${ORACLE_SID}.$$|while read inTables;do while read inTables;do Although both of these lines do the same thing in a different way, this is a common workaround for a pdksh bug. From the pdksh docs - `echo hi | read x' does not set x in the current shell - the read is done in a separate process Download pdksh, and see if you can get bb-roracle working with it. I am sure if it works, it will be better than my hacked version.
The other downside, is, I have completely forgotten how I implemented the defaults, or if I used bb-roracle or bb-voracle script. (I think it was bb-voracle, but both are included to cover my butt) Download the bb-roracle from deadcat and check the docs, and do a diff with my files. I also recall there being a $BBHOME/etc/bb-roracle.def which contained all the definitions and defined a $ORATAB I think $ORATAB contianed the SID and the alert log location, but I can't be sure any more. Again, check what's in the original bb-roracle.
Sorry I can't be more helpful, but it has been a long time since I worked as a DBA and monitored Oracle with Hobbit, and I have forgotten a lot. (A lesson to the rest of you - document everything you do, or you might end up like me) I also thought I had more than just the scripts, which might be pretty useless without the correct version of ksh.
Have fun and good luck.
Regards Vernon
P.S. In line with the mailing list "no attachments" policy, I will mail you the files direct. Anybody else who wants them, flick me an email.
cat ora-alert.ksh #!/usr/bin/ksh
OutFile=$BBHOME/tmp/oraalert.$$
Get the list of alert logs
while read ORACLE_SID LOG_FILE do COLOUR=green if [ -f $BBHOME/tmp/ALERT.$ORACLE_SID ] then LastLine=$(cat $BBHOME/tmp/ALERT.$ORACLE_SID) else # Could be the first time run LastLine=0 fi FileLen=$(wc -l $LOG_FILE | awk '{ print $1 }') tail +$LastLine $LOG_FILE > $BBHOME/tmp/Log.$ORACLE_SID # We can now look at the most recent additions to the Log file ((FileLen=FileLen+1)) [ $FileLen -lt $LastLine ] && LastLine=0 # The log was truncated [ $FileLen -eq $LastLine ] && echo "No new entries in log file"
$BBHOME/tmp/Log.$ORACLE_SID echo "$FileLen" > $BBHOME/tmp/ALERT.$ORACLE_SID grep "^ORA-" $BBHOME/tmp/Log.$ORACLE_SID > /dev/null && COLOUR=yellow grep "^ORA-00600" $BBHOME/tmp/Log.$ORACLE_SID > /dev/null && COLOUR=red echo "" > $OutFile echo $LOG_FILE >> $OutFile echo "" >> $OutFile cat $BBHOME/tmp/Log.$ORACLE_SID >> $OutFile echo "" >> $OutFile echo "" >> $OutFile $BB $BBDISP "status ${ORACLE_SID}.oraalert $COLOUR $(date) $(cat $OutFile)" rm $OutFile done < $BBHOME/etc/alert_log.tab
From: Ryan Jay B. Lapuz [mailto:rlapuz at fcpp.fujitsu.com] Sent: Thursday, 8 November 2007 9:59 AM To: hobbit at hswn.dk Subject: Re: [hobbit] Roracle
Hi sir!
I'm running oracle on solaris sparc. Could you please help me make it work. Right now I'm still monitoring tablespace manually because I was not able to implement it with hobbit. Please make the procedure as simple as possible because I have limited knowledge in oracle.
Thank you very much! Ryan
----- Original Message -----
From: Everett, Vernon <mailto:Vernon.Everett at woodside.com.au>
To: hobbit at hswn.dk
Sent: Wednesday, November 07, 2007 7:38 AM
Subject: RE: [hobbit] Roracle
Hi Stefan
If by Roracle you refer to bb-roracle script available from
deadcat, then yes, I have used it. (This contract, a few years back. Still have the scripts and ksh binary) Damn useful, once you get it working. Gave some good info. I don't think it did any graphing, but I may be wrong. The problem I encountered had to do with the subtle differences between different implementations of ksh. I suspect this is where you are getting stuck too. Yes, ksh differs from one version to the next, and the implementation I had on my server (Solaris Sparc) was just never going to work. Eventually, I got so fed up, I downloaded a different version of ksh, and put it in the ~hobbit directory structure, and changed the #! line to point to the new ksh. It was a horrible fix, but the best I could do under the circumstances. :-( If you are running Solaris on Sparc, I can send you what I have, but if you on a different architechture and OS, you are pretty much on your own. Cheers V
From: Stefan van der Walt [mailto:skjoldar at gmail.com]
Sent: Tuesday, 6 November 2007 10:18 PM
To: hobbit at hswn.dk
Subject: [hobbit] Roracle
Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get
the client to know the addon is there?
Thanks
Stefan
NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
I'm using bb-roracle (2.21a) on SPARC/Solaris9 , Oracle 10g
Default ksh works just fine
Script works on the client side.
What you need:
Create oracle user with only connect and select any tableprivileges
Extract Roracle-2-21a.tar.gz in temporary locationCopy ext/ bb-roracle.ksh to $HOBBITCLIENTHOME/extCopy etc/ bb-roracle.dbtab , etc/bb-roracle.def,etc/bb-roracle.ids to $HOBBITCLIENTHOME/etc
Edit bb-roracle.dbtab
You can leave only default settings:
grep -v ^# bb-roracle.dbtab
@:DATABASE_DEFAULT:94:97:80:95:85:75:85:75:85:75:30:15:80:90:N:85:95:85: 95:8:15:33:10:5:60
@:SYSTEM:90:95
@:connect_data:90:95
Edit bb-roracle.def
a. ORATAB=xxxx
b. DFT_ORACLE_HOME=xxx
c. ORA_PROCS=
Edit bb-roracle.ids
One line like:
LOCAL NAME_OF_SID dbuser password abc.Efghijkl.nop.. dbserver,mycompany,com LISTENER
Clientlaunch.cfg:
[roracle]
ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
CMD $HOBBITCLIENTHOME/ext/bb-roracle.ksh
LOGFILE $HOBBITCLIENTHOME/logs/roracle.log
INTERVAL 5m
Try it and it should work J
Alexander Levin
From: Ryan Jay B. Lapuz [mailto:rlapuz at fcpp.fujitsu.com] Sent: Wednesday, November 07, 2007 4:59 PM To: hobbit at hswn.dk Subject: Re: [hobbit] Roracle
Hi sir!
I'm running oracle on solaris sparc. Could you please help me make it work. Right now I'm still monitoring tablespace manually because I was not able to implement it with hobbit. Please make the procedure as simple as possible because I have limited knowledge in oracle.
Thank you very much!
Ryan
----- Original Message -----
From: Everett, Vernon <mailto:Vernon.Everett at woodside.com.au>
To: hobbit at hswn.dk
Sent: Wednesday, November 07, 2007 7:38 AM
Subject: RE: [hobbit] Roracle
Hi Stefan
If by Roracle you refer to bb-roracle script available from
deadcat, then yes, I have used it. (This contract, a few years back. Still have the scripts and ksh binary)
Damn useful, once you get it working. Gave some good info. I
don't think it did any graphing, but I may be wrong.
The problem I encountered had to do with the subtle differences
between different implementations of ksh. I suspect this is where you are getting stuck too.
Yes, ksh differs from one version to the next, and the
implementation I had on my server (Solaris Sparc) was just never going to work.
Eventually, I got so fed up, I downloaded a different version of
ksh, and put it in the ~hobbit directory structure, and changed the #! line to point to the new ksh.
It was a horrible fix, but the best I could do under the
circumstances. :-(
If you are running Solaris on Sparc, I can send you what I have,
but if you on a different architechture and OS, you are pretty much on your own.
Cheers
V
From: Stefan van der Walt [mailto:skjoldar at gmail.com]
Sent: Tuesday, 6 November 2007 10:18 PM
To: hobbit at hswn.dk
Subject: [hobbit] Roracle
Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get
the client to know the addon is there?
Thanks
Stefan
NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.
As an addition to Roracle, feel free to use following script ( on the client in the ext folder ) to chart ( ncv ) tablespace usage:
================
#!/usr/local/bin/python
import os
import sys
import cx_Oracle
import StringIO
import socket
import time
import string
BB = os.environ["BB"]
BBTMP = os.environ["BBTMP"]
BBDISP = os.environ["BBDISP"]
os.environ['BBPROG'] = 'ora-tbs.py'
TEST = 'oratbs'
os.environ['TEST'] = TEST
MACHINE = socket.gethostname()
MACHINE = string.replace(MACHINE, '.', ',')
DATE = time.strftime("%a %b %d %H:%M:%S %Z %Y", time.localtime(time.time()))
connection = cx_Oracle.connect("dbuser/password")
sql = """ SELECT F.TABLESPACE_NAME,
TO_CHAR ((T.TOTAL_SPACE - F.FREE_SPACE),'999,999') "USED (MB)",
TO_CHAR (F.FREE_SPACE, '999,999') "FREE (MB)",
TO_CHAR (T.TOTAL_SPACE, '999,999') "TOTAL (MB)",
TO_CHAR ((ROUND ((F.FREE_SPACE/T.TOTAL_SPACE)*100)),'999')
PER_FREE
FROM (
SELECT TABLESPACE_NAME,
ROUND (SUM (BLOCKS*(SELECT VALUE/1024
FROM V$PARAMETER
WHERE NAME = 'db_block_size')/1024)
) FREE_SPACE
FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME
) F,
(
SELECT TABLESPACE_NAME,
ROUND (SUM (BYTES/1048576)) TOTAL_SPACE
FROM DBA_DATA_FILES
GROUP BY TABLESPACE_NAME
) T
WHERE F.TABLESPACE_NAME = T.TABLESPACE_NAME ORDER BY 1
"""
cursor = connection.cursor()
cursor.arraysize = 50
cursor.execute (sql)
i1 = cursor.fetchall()
output = StringIO.StringIO()
for z in range(i1.__len__()):
print >> output, i1[z][0].ljust(15) + " : " + i1[z][4]
L0 = output.getvalue()
output.close()
COLOR = 'green'
LINE = "status " + MACHINE + "." + TEST + " " + COLOR + " " + DATE + " Tablespaces on " + MACHINE + '\n' + L0
cmd = BB + ' ' + BBDISP + ' "' + LINE + '"'
os.system(cmd)
===============
Alexander Levin
From: Ryan Jay B. Lapuz [mailto:rlapuz at fcpp.fujitsu.com] Sent: Wednesday, November 07, 2007 4:59 PM To: hobbit at hswn.dk Subject: Re: [hobbit] Roracle
Hi sir!
I'm running oracle on solaris sparc. Could you please help me make it work. Right now I'm still monitoring tablespace manually because I was not able to implement it with hobbit. Please make the procedure as simple as possible because I have limited knowledge in oracle.
Thank you very much!
Ryan
----- Original Message -----
From: Everett, Vernon <mailto:Vernon.Everett at woodside.com.au>
To: hobbit at hswn.dk
Sent: Wednesday, November 07, 2007 7:38 AM
Subject: RE: [hobbit] Roracle
Hi Stefan
If by Roracle you refer to bb-roracle script available from
deadcat, then yes, I have used it. (This contract, a few years back. Still have the scripts and ksh binary)
Damn useful, once you get it working. Gave some good info. I
don't think it did any graphing, but I may be wrong.
The problem I encountered had to do with the subtle differences
between different implementations of ksh. I suspect this is where you are getting stuck too.
Yes, ksh differs from one version to the next, and the
implementation I had on my server (Solaris Sparc) was just never going to work.
Eventually, I got so fed up, I downloaded a different version of
ksh, and put it in the ~hobbit directory structure, and changed the #! line to point to the new ksh.
It was a horrible fix, but the best I could do under the
circumstances. :-(
If you are running Solaris on Sparc, I can send you what I have,
but if you on a different architechture and OS, you are pretty much on your own.
Cheers
V
From: Stefan van der Walt [mailto:skjoldar at gmail.com]
Sent: Tuesday, 6 November 2007 10:18 PM
To: hobbit at hswn.dk
Subject: [hobbit] Roracle
Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get
the client to know the addon is there?
Thanks
Stefan
NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.
On Tuesday 06 November 2007 15:18:14 Stefan van der Walt wrote:
Have any of you installed this addon into hobbit?
The instructions are sparse, and I just need to know how to get the client to know the addon is there?
Note that there are other tools for monitoring Oracle, such as dbcheck from http://sourceforge.net/projects/hobbit-perl-cl/
Regards, Buchan
participants (6)
-
alevin@reveredata.com
-
bgmilne@staff.telkomsa.net
-
josh@imaginenetworksllc.com
-
rlapuz@fcpp.fujitsu.com
-
skjoldar@gmail.com
-
Vernon.Everett@woodside.com.au