error on script
list Sailesh
Hi all, I have an script for checking my database. I am getting an error but I am unable to trouble shoot. Please see error . /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error bash-3.00# The script output is below. Part of the script is running. But the output is not being diaplayed on xymon web page. See below:- bash-3.00# more bb-roracle.ksh.16030.sun1_test </pre> <br><br><FONT SIZE=+2><b>Process Check</b></FONT> (cnp1)<hr> <br> &clear Database process test disabled <br><br><FONT SIZE=+2><b>Database Checks</b></FONT> (cnp1)<hr> &green Database check: cnp1 is up <br> &clear User count check: Disabled <br> &clear User check: Disabled <br><br><FONT SIZE=+2><b>Tablespace Check</b></FONT> (cnp1)(Show greens Y)<hr> <br> &green Tablespace cnp1:USERS totals 208.8Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:UNDOTBS1 totals 6585.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:TNIDX totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:TNDATA totals 1300.0Mb and is <B>4%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:TEPSIDX totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:TEPSDATA totals 100.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:SYSTEM totals 3200.0Mb and is <B>10%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:SYSAUX totals 570.0Mb and is <B>2%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:ROCIND totals 1300.0Mb and is <B>3%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:ROCDATA totals 9830.0Mb and is <B>28%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:ROC totals 1000.0Mb and is <B>2%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:PORTALIND totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:PORTAL totals 650.0Mb and is <B>2%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:OTSIDX totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:OTSDATA totals 400.0Mb and is <B>1%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSSMSP totals 30.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSSMS totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSPORTAL totals 200.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSONL totals 1180.0Mb and is <B>3%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSMFA totals 70.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSMAST totals 150.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSFRT totals 80.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSEPS totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MNSDECLARANT totals 30.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YE S <br> &green Tablespace cnp1:MNSBOELK totals 19.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MCCICO totals 450.0Mb and is <B>1%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:MASTUTOR totals 100.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:FPSDATA totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:EPSMOHENV totals 10.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:EPSMOH totals 60.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:EPSENV totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:DMSIND totals 5.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:DMSDATA totals 507.0Mb and is <B>1%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:CNPMS totals 10.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:CNPIND totals 4746.0Mb and is <B>13%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:CNP totals 20480.0Mb and is <B>50%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:BANKIND totals 800.0Mb and is <B>2%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:BANKDATA totals 4000.0Mb and is <B>11%</B> used, AUTOEXTENSIBLE=YES <br> &green Tablespace cnp1:ARCH totals 50.0Mb and is <B>0%</B> used, AUTOEXTENSIBLE=YES <br><br><FONT SIZE=+2><b>Extent Check</b></FONT> (cnp1)<hr> <br> &green No objects are exceeding extent thresholds. Extent test ok. <br> &clear Shadow check: Disabled <br><br><FONT SIZE=+2><b>PIN hit ratio for lib cache Check</b></FONT> (cnp1)<hr> <br>ERROR: invalid permissions for user (system) in cnp1 <br><br><FONT SIZE=+2><b>SQL Area Hit Ratio Check</b></FONT> (cnp1)<hr> <br>ERROR: invalid permissions for user (system) in cnp1 <br><br><FONT SIZE=+2><b>Block Buffer Hit Ratio Check</b></FONT> (cnp1)<hr> <br>ERROR: invalid permissions for user (system) in cnp1 <br><br><FONT SIZE=+2><b>Shared Memory Check</b></FONT> (cnp1)<hr> <br>ERROR: invalid permissions for user (system) in cnp1 <br><br><FONT SIZE=+2><b>RollBack Check</b></FONT> (cnp1)<hr> <br> &red Object cnp1: ROLL BACK percentage for SYSTEM is <B><U><FONT COLOR=RED>98.97%</FONT></ U></B>. Extremely High Regards, Sailesh
Attachments (1)
list Henrik Størner
On Wed, 7 Dec 2011 12:08:54 +0400, "Sailesh"
▸
<user-603c06b12dd1@xymon.invalid> wrote:I have an script for checking my database. I am getting an error but I am unable to trouble shoot. /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error bash-3.00#
The script appears to use the Korn Shell (ksh), so you'll have to install that for it to work. From the command prompt, it seems you are running Bash. On Linux, you can usually install the "ksh" or "pdksh" packages to get a working ksh. And make sure the first line of the script points to your "ksh" binary, like #!/bin/ksh if it is installed in /bin Regards, Henrik
list Paul van Eldijk
Op 7-12-2011 9:08, Sailesh schreef:
▸
Hi all, I have an script for checking my database. I am getting an error but I am unable to trouble shoot. Please see error . /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error
In ksh (and bash), you say: ((VAR0 += 2)) (spaces makes it more readable, but are not mandatory) regards, Paul
list David W David Gore
It may be important to keep in mind the different versions of Korn shell. I cannot remember which script assumed that I had ksh93 which wasn't the version installed on our Solaris machines, maybe it was AIX or HPUX who knows. So it caused errors that could only be resolved by knowing the differences and how to resolve those differences between the older and newer versions of Korn shell. Regardless, although it took me some time to understand some database details, dbcheck.pl seemed to be a better tool that you can run from the Xymon server. ~David
▸
-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of user-ce4a2c883f75@xymon.invalid
Sent: Wednesday, December 07, 2011 07:37
To: Sailesh
Cc: xymon at xymon.com
Subject: Re: [Xymon] error on script
On Wed, 7 Dec 2011 12:08:54 +0400, "Sailesh"
<user-603c06b12dd1@xymon.invalid> wrote:I have an script for checking my database. I am getting an error but I am unable to trouble shoot. /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error bash-3.00#
The script appears to use the Korn Shell (ksh), so you'll have to install that for it to work. From the command prompt, it seems you are running Bash. On Linux, you can usually install the "ksh" or "pdksh" packages to get a working ksh. And make sure the first line of the script points to your "ksh" binary, like #!/bin/ksh if it is installed in /bin Regards, Henrik
list Wes Neal
I have the following in my hobbit-clients.cfg file. DEFAULT UP 1h DISK "%^/cdrom.*/" IGNORE DISK "%^/mnt.*/" IGNORE I do not have an individual HOST line for the server in question, but it comes back red with the below on this particular server. red /cdrom/sol_10_509_sparc (100% used) has reached the PANIC level (95%) Any idea why this might be happening. I have these same lines on some specific HOSTS in the file and they work fine, but I wanted to switch it to the DEFAULT and doesn't seem to want to work for me. Thanks Wes
list Vernon Everett
I remember bumping into this one some time back.
I cannot remember how I fixed it - although I have vague recollections of
modifying it to suite my ksh version.
That was about 5 or 6 contracts ago, so I no longer have the code, but I
think I did pass it on to somebody on the list.
There is also a remake of bb-moracle on the Xymonton web page. It looks
like it needs sh, making it a little more portable.
Why not check if that will suit you needs?
Regards
Vernon
▸
On 10 December 2011 23:44, Gore, David W (David) <user-368fd67cc6bd@xymon.invalid>wrote:
It may be important to keep in mind the different versions of Korn shell. I cannot remember which script assumed that I had ksh93 which wasn't the version installed on our Solaris machines, maybe it was AIX or HPUX who knows. So it caused errors that could only be resolved by knowing the differences and how to resolve those differences between the older and newer versions of Korn shell. Regardless, although it took me some time to understand some database details, dbcheck.pl seemed to be a better tool that you can run from the Xymon server. ~David -----Original Message----- From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of user-ce4a2c883f75@xymon.invalid Sent: Wednesday, December 07, 2011 07:37 To: Sailesh Cc: xymon at xymon.com Subject: Re: [Xymon] error on script On Wed, 7 Dec 2011 12:08:54 +0400, "Sailesh" <user-603c06b12dd1@xymon.invalid> wrote:I have an script for checking my database. I am getting an error but I am unable to trouble shoot. /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error bash-3.00#The script appears to use the Korn Shell (ksh), so you'll have to install that for it to work. From the command prompt, it seems you are running Bash. On Linux, you can usually install the "ksh" or "pdksh" packages to get a working ksh. And make sure the first line of the script points to your "ksh" binary, like #!/bin/ksh if it is installed in /bin Regards, Henrik
--
"While it is futile to try to eliminate risk, and questionable to try to
minimize it, it is essential that the risks taken be the right risks. "
- Peter F. Drucker
list Vernon Everett
Hi all
I just had a scan through one of my old USB thumb-drives on my key-ring,
and behold, I found a copy of my version from 2006.
Doing a compare though, I see the only change is to use a different
instance of ksh.
I think I must have got fed up trying to mod the code.
Sorry I can't help you much further.
Regards
Vernon
▸
On 12 December 2011 06:28, Vernon Everett <user-b3f8dacb72c8@xymon.invalid> wrote:
I remember bumping into this one some time back. I cannot remember how I fixed it - although I have vague recollections of modifying it to suite my ksh version. That was about 5 or 6 contracts ago, so I no longer have the code, but I think I did pass it on to somebody on the list. There is also a remake of bb-moracle on the Xymonton web page. It looks like it needs sh, making it a little more portable. Why not check if that will suit you needs? Regards Vernon On 10 December 2011 23:44, Gore, David W (David) <user-368fd67cc6bd@xymon.invalid>wrote:It may be important to keep in mind the different versions of Korn shell. I cannot remember which script assumed that I had ksh93 which wasn't the version installed on our Solaris machines, maybe it was AIX or HPUX who knows. So it caused errors that could only be resolved by knowing the differences and how to resolve those differences between the older and newer versions of Korn shell. Regardless, although it took me some time to understand some database details, dbcheck.pl seemed to be a better tool that you can run from the Xymon server. ~David -----Original Message----- From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of user-ce4a2c883f75@xymon.invalid Sent: Wednesday, December 07, 2011 07:37 To: Sailesh Cc: xymon at xymon.com Subject: Re: [Xymon] error on script On Wed, 7 Dec 2011 12:08:54 +0400, "Sailesh" <user-603c06b12dd1@xymon.invalid> wrote:I have an script for checking my database. I am getting an error but I am unable to trouble shoot. /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error /xymon/client/ext/bb-roracle.ksh[58]: (VAR0+=2),(VAR1+=2): syntax error bash-3.00#The script appears to use the Korn Shell (ksh), so you'll have to install that for it to work. From the command prompt, it seems you are running Bash. On Linux, you can usually install the "ksh" or "pdksh" packages to get a working ksh. And make sure the first line of the script points to your "ksh" binary, like #!/bin/ksh if it is installed in /bin Regards, Henrik-- "While it is futile to try to eliminate risk, and questionable to try to minimize it, it is essential that the risks taken be the right risks. " - Peter F. Drucker
-- "While it is futile to try to eliminate risk, and questionable to try to minimize it, it is essential that the risks taken be the right risks. " - Peter F. Drucker
list Henrik Størner
On Sun, 11 Dec 2011 10:14:43 -0500, "Neal, Jonathan W"
▸
<user-9e31f92d698c@xymon.invalid> wrote:I have the following in my hobbit-clients.cfg file. DEFAULT UP 1h DISK "%^/cdrom.*/" IGNORE DISK "%^/mnt.*/" IGNORE I do not have an individual HOST line for the server in question, but it comes back red with the below on this particular server. red /cdrom/sol_10_509_sparc (100% used) has reached the PANIC level
(95%)
Any idea why this might be happening. I have these same lines on some specific HOSTS in the file and they work fine, but I wanted to switch it to the DEFAULT and doesn't seem to want to work for me.
It is generally not a good idea to put such rules in the DEFAULT section;
it really is meant only for setting the default thresholds.
Instead, put these in a "HOST=*" section right above the DEFAULT section.
Regards,
Henrik